Page 1 of 1
Scripts not loading
PostPosted: Thu Jan 12, 2017 10:13 pm
by dargon
On my server, any time i restart the server, 1 or 2 of my scripts will stop working, the scripts are located in Debug\Scripts. I had temporarily fixed it by adding it to GameServerScripts and recompileing, but again they have quick working. Any idea why scripts that worked 5 minutes before restarting the server would no longer work?
Re: Scripts not loading
PostPosted: Fri Jan 13, 2017 5:55 am
by PlanarChaosRvrtwo
Some of those scripts are assicioated with other scripts n such so if you change something on the code you can break a code you dint touched couse it read out something from the script you just edited.
Re: Scripts not loading
PostPosted: Fri Jan 13, 2017 7:36 am
by dargon
If it was core code maybe, but these are custom scripts, and no code was changed between reboots
Re: Scripts not loading
PostPosted: Fri Jan 13, 2017 8:19 am
by HunabKu
The files directly in Debug/Scripts can not work or not loaded, try tu put it in a subfoler like Debug/Scripts/dargonScripts/myscript.cs
Re: Scripts not loading
PostPosted: Fri Jan 13, 2017 8:28 am
by dargon
they are subfoldered /scripts/custom/mobs or items etc to stay organized. Its weird if i restart the server 3 or 4 times they start working again, just to stop on next revoot again.. it makes it difficult to make custom scripts haha
Re: Scripts not loading
PostPosted: Fri Jan 13, 2017 8:30 am
by dargon
Weirdest part is its not like the scripts error out. The server will load up, as if the scripts arent there at all
Re: Scripts not loading
PostPosted: Fri Jan 13, 2017 11:39 am
by LugusSkye
If you switch to Release mode, you need scripts to be in Release folder as well.
A suggestion, to make it easy on yourself (I might get yelled at by some devs here) - create a class for each script in gameserver and let it load automatically no matter what environment you in and no external files are required. Don't do it for all, only ones you need.
Re: Scripts not loading
PostPosted: Sat Jan 14, 2017 5:16 pm
by Loki
I think it would help if we knew what these scripts are!. Do they reference something in the database that is no longer there, trying to create something that is already there.
Can we see your error log also.
Thank you
Re: Scripts not loading
PostPosted: Sat Jan 14, 2017 11:24 pm
by dargon
Weirdest part is its not like the scripts error out.
Error logs only pop up for replaceing npc classes being replaced by GameNpc. No actual code error. I rearranged some of my scripts and they're loading for now i may have to juat keep moving them if it happens again
Re: Scripts not loading
PostPosted: Sat Jan 14, 2017 11:51 pm
by Loki
Not really a solution but if it works for you, I guess crack on
Good luck
Jay