Blockland Forums > Help
Server loading add-ons to 40%, going back to 0%, and repeating
Greek2me:
Badspot, we encountered a bug like this before. We hunted for a solution for a while and I think we discovered the cause. I'll post a link as soon as the ScatteredSpace website comes back online...
Greek2me:
Ok, here is the link: http://scatteredspace.com/forum/index.php?topic=1880.msg38693#msg38693
Thanks to Mr. Doom for the solution.
So OP, one of your add-ons is using the local variable, %i, in the global scope, which is messing up the load add-ons loop.
Ephialtes:
I *think* this can also happen if you use the findFirstFile/findNextFile functions when your add-on gets executed since those operate globally too.
Demian:
--- Quote from: Greek2me on January 04, 2013, 10:10:38 PM ---Ok, here is the link: http://scatteredspace.com/forum/index.php?topic=1880.msg38693#msg38693
Thanks to Mr. Doom for the solution.
So OP, one of your add-ons is using the local variable, %i, in the global scope, which is messing up the load add-ons loop.
--- End quote ---
For those who don't have an account at SS:
--- Quote from: Mr. Doom ---PROBLEM SOLVED.
DM+'s Ranks.cs
Line 164.
Use of %i in console local scope.
I have discovered that apparently the loading routine runs at the console's local scope instead of the scope of a function, which is strange, but whatever. Never use %i at the console local scope in your scripts. I would also suggest avoiding other one letter local scope variables, just use longer names, it doesn't hurt. As I suggested to Boom, if you have a global scope variable that you use to store the max count, then just use and increment that variable instead, so you'll never have problems again.
And now DM+ & Slayer run on both my dirty Windows 7 64-bit install of Blockland, and my clean install that is running under Ubuntu.
Sincerely,
Mr. Doom
--- End quote ---
Greek2me:
Sorry, didn't realize that topic was in the hidden archive. Thanks Demian.