Game Development Community

Compiling & errors

by Vern Jensen · in Torque Game Builder · 06/17/2006 (12:45 am) · 4 replies

Something I miss from good old C++ or Java is that you get immediate feedback on whether your code has obvious problems or not when you hit Compile. What's the best way to get this same kind of feedback in TGE?

I have code that clearly isn't right, but when I hit run, it simply doesn't perform as expected, without reporting any syntax errors or anything. I'd really rather get notified that there are errors. What's the best way of doing this?

Also, it seems silly to have to quit TGE and start it up again just to get it to recognize changes I've made to a script. It seems like a "Recompile Scripts" button (or "Build" or similar) should be added to TGE, perhaps right next to the Run Game button. This would also solve the problem above of not getting immediate feedback? Build would tell you if there are any problems, and what they are.

-Vern

#1
06/17/2006 (3:44 pm)
In RC3 the game scripts (executed from startgame() only, I think) are recompiled.
Try throwing an "echo("1"); in startgame(), then run the game from the level editor, quit back to the level editor, change 1 to 2 and hit run again. It should work. :)
(I think there was a bug in RC1/2 where it didn't work properly)
#2
06/17/2006 (10:36 pm)
Unfortunately, no, I still have to quit and restart to get any changes to my script to recompile. This is in RC3 for MacOS X. Might be different on Windows, not sure.

-Vern
#3
06/18/2006 (1:24 am)
The "run" button is just that... a "recompile scripts" button. Hit the tilde to see a list of errors in the console, or after you quit TGB you can open console.log to read it in a text editor.

If there are errors in your script your game will run with the last working .dso files associated with your game.
#4
06/18/2006 (3:08 pm)
For me, im not working with the level editor at all, im creating everything in script, so i think the only way for me is to quit and re-start.