Page 1 of 1
Script Loading and Command-line syntax checker
Posted: Thu Aug 14, 2008 7:38 am
by John Adams
LE,
How much of a load would it put on server/zone startup if we did not load spawnscripts (or others) "just because they exist"? I see some spawnscripts that do not belong to any NPC (there is no spawn_script set for their zonespawngroup) yet the server start is reporting errors in the scripts.
We know about the errors, but do not need the server telling us about them.

Will this strain the startup much to check if it is assigned before parsing/processing it?
And secondly, can you whip up a quicky command-line "syntax checker" for our scripting, just for basic validation?
Thanks
Re: Script Loading and Command-line syntax checker
Posted: Thu Aug 14, 2008 8:10 am
by Scatman
John Adams wrote:
And secondly, can you whip up a quicky command-line "syntax checker" for our scripting, just for basic validation?
Pfft, my scripts always work first try!

/sarcasim off hehe
Posted: Thu Aug 14, 2008 9:07 am
by John Adams
Heh, mine sure as hell don't!
Re: Script Loading and Command-line syntax checker
Posted: Thu Aug 14, 2008 2:22 pm
by LethalEncounter
John Adams wrote:
And secondly, can you whip up a quicky command-line "syntax checker" for our scripting, just for basic validation?
Thanks
You mean like checking them on startup?

I can add an in game command that will check a file for errors if that is OK with you, but I would rather not remove the automatic loading of scripts upon world startup as it would create other problems.
Posted: Thu Aug 14, 2008 4:47 pm
by John Adams
As to the command-line checker, no. Smarty pants. I was hoping to not have to start the world completely and get a stream of bad syntaxes because I am such a proficient script writer.

Maybe you do not see how we are planning to write many of our scripts, but the authors cannot see the syntax errors on TessEQ2, because they are editing/building scripts via my editor... this is why I asked, not because I think you have nothing better to do with your time.

But we can move on... it's not that critical. Maybe I can build it into the editor.
As for loading all scripts at startup... I didn't know it did that. I thought it only read the files when they were needed. How is this going to effect server over-head once 10,000 scripts are all loaded at once? If you say negligible, I believe you. Just checking.
Posted: Thu Aug 14, 2008 5:40 pm
by LethalEncounter
Unless all 10,000 are being used at the same time I couldnt see it having a problem as the scripts are just loaded into memory and called when needed. Most scripts are going to be fairly simple and be 4 KB or less. For 10,000 scripts that is still only 40 MBs of RAM that is needed.
Posted: Thu Aug 14, 2008 5:45 pm
by John Adams
I hate it when you use math against me!

I gotcha now, thanks.