Script parser


(Flippy) #1

I don’t know if this goes into this forum but yeah… ill try anyway ^^

I’m making the ETScript program, a script editor to create scripts for custom maps.

I heard that there is a parser somewhere in the ET source code I might be able to use to check if there are any errors in the script, even before you load the map…
I guess it’s obviously the code that the game uses before you load a map, and if something is wrong (for example a forgotten “}”) the game will tell you…

This would be a very cool feature to my program.

Unfortunately, I have never even looked at ET code before and I have absolutely no idea where i could find it…
Can anyone give me any pointers, or if it’s not too long (which i doubt) perhaps the complete code?

Also, if anyone knows how I can use this code inside a VB application that would be great, but I think i can better ask that on a VB forum :slight_smile:


(SCDS_reyalP) #2

the src/game/g_script*.c files should get you started. The actual parsing stuff is likely in q_shared.c


(Flippy) #3

Where do I even get the files from? I really have no clue :expressionless:

And it’s written in normal C right? Can I open that with Visual Studio 2005 ?


(nUllSkillZ) #4

C files are plain text files.
The source is available for download.
ET 2.60 SDK (Windows) @ wolfmap.de


(Flippy) #5

Thanks.

I know C files can be opened like text files, but I meant if I can open it in VS2005, and have syntax highlighting and stuff like that… probably not…

EDIT nevermind… I can :smiley:

Can anyone give me a brief explanation of how these scripts are used?
I’m just reading the void G_Script_ScriptParse piece… Is that all I will need?