Blockland Forums > Modification Help

Crash on exec server.cs

(1/2) > >>

PhantOS:
so whenever i execute some files on a remote VM thats hosting a blockland server, the game will crash after reaching the first line. It'll say something like "Establishing global variable. Failed: %error" and then it'll crash the game. ive tried using setModPaths(Getmodpaths()); but it still crashes when i exec the file. the file is Weapon_DwepRussianExpansion

Conan:
are you execing it after the server is running? local variables exec'd in global context will instantly crash the server - this includes stuff in mods that does like %error = ForceRequiredAddon(etc); etc... since those %error values are local variables attempting to be run in the global scope. however if they're exec'd normally in the loading process by being enabled, they are fine, as addons are not loaded in global context.

PhantOS:
ive never encountered it before. im execing after the server is running. see, i've done exec("add-ons/weapon_stuff/server.cs"); before on server.cs files that have those forcerequiredaddon bullstuffs and never encountered a crash before. whats the best way to execute server.cs files that have that in it? after server run?

jes00:
I never use local variables outside of functions in my add-ons. They can cause never ending loading in some cases.

PhantOS:
im not using them. its just inside most weapon add-ons' server.cs. i dont know why its crashing the VM but not my regular computer

Navigation

[0] Message Index

[#] Next page

Go to full version