Search the Community

Showing results for tags 'server error'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • RAGE Multiplayer
    • Announcements
    • Discussion
    • Suggestions
    • RDR2 Multiplayer
  • Scripting
    • Scripting
    • Resources
  • Community
    • Support
    • Servers
    • Media Gallery
  • Non-English
    • Русский - Russian
    • Français - French
    • Deutsch - German
    • Espanol - Spanish
    • Română - Romanian
    • Portuguesa - Portuguese
    • Polski - Polish

Categories

  • Scripts
  • Gamemodes
  • Libraries
  • Plugins
  • Maps
  • Tools

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Facebook


Youtube


Skype


Web


VK

Found 1 result

  1. Hello guys, I am trying to make a function that returns if a player is located around a marker/position at a certain radius. The first solution in my mind was to set an interval in which it checks every 5 sec or so if the player is inside the radius of a position. But if I put the json/object inside the setInterval function, the server crashes when this function is called. I know for sure the json is the problem, beacuse if i just put a console.log inside the setInterval, it works fine. Error: async hook stack has become corrupted (actual: 10, expected: 11) There's other code going on than just this piece, I thought this might be enough to see what's going. Many thanks in advance for your help. Have a great day! Erwin let positions = require('./positions.json'); function startCheckingCaps(player){ setInterval(function(){ positions.cap.forEach(function(v,i){ if (inRadius(v)){ //inRadius checks if player.position is inside the radius of the current position 'v' player.notify("capturing " + v.name); } else { player.notify("not capturing"); } }); //console.log("if its just this in setInterval, it works just fine."); }, 5000); } mp.events.add('playerJoin', (player) => { startCheckingCaps(player); //<------------------------- this is the one from above });