Author Topic: Default Minigame and Bots cause Lag  (Read 479 times)

So, I created a default minigame with a low amount of bots (15) and instantly, I get the console spammed full of

Add-Ons/Script_DefaultMiniGame/server.cs (367): Unable to find object: '' attempting to call function 'getClassName'
BackTrace: ->[sportBallsPackage]fxDTSBrick::onPlayerTouch->fxDTSBrick::onPlayerTouch->fxDTSBrickData::onPlayerTouch->[DefaultMiniGame]getMiniGameFromObject->getClientFromObject
%
%
ERROR: getBrickGroupfromObject() - "" is not an object
BackTrace: ->[sportBallsPackage]fxDTSBrick::onPlayerTouch->fxDTSBrick::onPlayerTouch->fxDTSBrickData::onPlayerTouch->[DefaultMiniGame]getMiniGameFromObject->getBrickGroupFromObject
%

The problem goes away when I either end the minigame, or clear bots. But resumes again when either of those conditions are restored. I did not have this problem an hour ago doing the exact same thing on the exact same map, so I am unsure as to why now my game is going apesh*t. Any insight is appreciated .

Can you post the full code?

The problem goes away when I either end the minigame, or clear bots. But resumes again when either of those conditions are restored. I did not have this problem an hour ago doing the exact same thing on the exact same map, so I am unsure as to why now my game is going apesh*t. Any insight is appreciated .
nothing changed between when it was working and when it stopped?
what if you reboot blockland?

A: that is the full code, or as far as I can see. It's repeating so fast it fills the console immediately.
B: Yeah, I made the map, bots, minigame before. Started it up again after loading said save and once I start the minigame that's when the code goes berserk. It seems to be a random issue at this point, I simply switched from the script_defaultminigame mod to the server_defaultminigame alternative and I haven't had the issue since.

Full code, I assume Felipe meant the add-on link