Scripts / Debugging LUA scripts

Author
Message
GoDevils
9
Years of Service
User Offline
Joined: 24th Sep 2014
Location: Arizona USA
Posted: 24th Feb 2015 04:52
When I first try to run a new script, it is almost for sure that I'll have a few errors to correct. Currently, when I attempt to run a new script for the first time, the test level loading process get's stuck during the "Loading Lights" display. As there is no screen control boxes to the start-up screen, the only way to regain control is through Task Manager, where once I get screen control back I can see the LUA error message.

To make matters worse, Game-Guru does not reset, so I must close it down through the Task Manager, meaning that I not only have to correct the script, but reload everything so I can try again. Very Very Time Consuming!

If someone has a better way I'm all ears???
However, the ability to display error codes, and reset without having to shut-down and restart GG every time would be nice.

"There is no spoon"
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 24th Feb 2015 09:44
There is at the moment no real debugger sadly, but you not must close game guru. Just click on ther error panel "ok" an let him some time, for me it return to a previous session.
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
GoDevils
9
Years of Service
User Offline
Joined: 24th Sep 2014
Location: Arizona USA
Posted: 24th Feb 2015 17:32
Thanks Corno_1

Yes, I have seen that, however, in my case half the time when the system resets it crashes, or once it has reset, it often won't run test mode?? Since 009 I had to very often restart my computer because after the attempt to reset, Reloaded (GG) will not even restart. If I kill GG in Task Manager, I can usually restart GG without reboot.

This is a problem. We need a better debug option for GG
"There is no spoon"
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 24th Feb 2015 19:43
that's very bizarre, i think gameguru has a great reloading feature when it hits an error which works really well for me and i hit a lot of errors while scripting.
which OS are you using? could be an issue with privileges i guess.

best bet would be to get a colour coded editor so you can spot some simple mistakes but there's not really any easy way to debug the script as you'll likely be using a lot of functions which are specific to gameguru
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
Jerry Tremble
GameGuru TGC Backer
11
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 25th Feb 2015 01:44
Quote: "best bet would be to get a colour coded editor so you can spot some simple mistakes but there's not really any easy way to debug the script as you'll likely be using a lot of functions which are specific to gameguru"


I wish I knew which one it was, but one that I've used in the past lets you add your own commands/functions/etc so that it will highlight accordingly. Or maybe they all do that!
MAME Cab PC: i7 4770@3.4Ghz (passmark 9945), 12GB RAM, Win 8.1/64, GeForce GTX645 (passmark 1898); Shiny new laptop: i7 4800MQ@2.7Ghz (passmark 8586), 16GB RAM, Win 8.1/64, GeForce GTX870M (passmark 3598); Old laptop: i5@2.3Ghz, 8GB RAM, Win 7/64, Intel 3000 graphics
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 25th Feb 2015 20:59
Quote: "I wish I knew which one it was, but one that I've used in the past lets you add your own commands/functions/etc so that it will highlight accordingly. Or maybe they all do that!"


true you could do that too if you wanted, most have the option i would think if you look under the language choice/settings
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
J_C
16
Years of Service
User Offline
Joined: 9th Nov 2007
Location:
Posted: 25th Feb 2015 23:12
** I am not advising anyone to do what I am doing - I am just giving my experience so far **

I am with smallg ... on this .. I have no problems with Reloaded - now GG...
The only time I did have problems was when I let Reloaded install itself in the Program Files folder ( like you are told to do)..
So every update of Reloaded... I have installed into my own folder..

C:\3dStuff\The Game Creators\FPS Creator Reloaded

In fact I have all the versions of Reloaded still installed on my PC..
I have never uninstalled any version of Reloaded... I simply rename the folder and install the new version...
Then I copy the old version over to my F: drive ... so I never loose a model or a script from my last version...
I then can check what is different from the old to new versions.. any files changed or added...

What I am trying to say is that when Reloaded was in the Program files folder.. I did have similar experience to what
you describe in having to restart Reloaded when I had a script error...The act of actually copying the updated script
into the reloaded script folder caused Reloaded to crash ( or windows to crash my setup) it was a pain...

Now my setup for scripting is this...
1. I now Have Windows 8.1 (64bit) PC -- ( before Christmas it was Vista 32bit PC)

2. I have 2 monitors... I think this can help.. because when in Test mode... the script freezes the start-up...
invariably - there will be no visual clue... Reloaded just looks like it is frozen... but there will be an error box hidden
behind the main window...
This is where the second monitor was my saviour.. as its bottom start bar will show and extra Reloaded icon.. this is the
error box... I can open it from this monitor see the script error step and check my script... which is open in editor
on this second screen..

3. I use notepad++ as it has a Lua syntax colour display option.. ( and its free download)

4. I check my script make an update then save it.. ( I always edit a script copy in my lua test folder).

5. I copy the new updated script into the reloaded script folder...

6. I then close the Reloaded Error box... Reloaded now recovers itself... and will invariable carry on into the Test game..
( but it has not got a working script - so must exit)

7. I Exit the test game .. back in the editor I press Test game and.. The game will load new script and play - or crash again
and I repeat the fix procedure above...

Since I have had the new Win-8.1-PC I have changed this setup a little...
I now copy the script folder from GG and save it to a safe folder...
and now I edit the script straight inside the GG scriptbank folder thus saving the copy and paste each time I make
updates..
It all works smooth as silk...

I have now also got GameGuru installed in my C:\3dstuff \Steam folder...
and its all working like a dream ... updates are a breeze from Steam and very quick..
I just love it...( early access for multi-play tests)...



PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 26th Feb 2015 13:33
i also have reloaded (pre-gameguru) on a specific folder - not program files - so might possibly be some truth there although i'm 99% sure i always have and also used to get the task manager exit only in the early versions... so who knows.

that's always been the biggest issue with computers though, everyone gets different results because there are just so many different factors.
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
GoDevils
9
Years of Service
User Offline
Joined: 24th Sep 2014
Location: Arizona USA
Posted: 3rd Mar 2015 20:45
@ JC

I've had Win 8.1 since I began with Reloaded (v003), and like you I found that I had far fewer problems when I installed in a separate folder. I too still have 1.01 installed, but I let Steam install GG in the programs(x86) folder, and thus far it has operated well, except for these reset problems. I had the same problems with the earlier versions... (during a test load with a new script, the load stops when the error is detected, but I cannot see the error, or reset without task manager)

The developers need to begin by reducing the test-level splash screen to a window rather than taking the entire screen and leaving us no control. Next they need to get the LUA error messages to show over the splash screen so they can be seen and discarded without having to go to Task Manager. Finally, there are bugs in the reset system that need to be fixed!

I've reached the point where when I go through this I simply kill GG with Task Manager. Usually, this allows me to reboot GG, without rebooting my computer (usually).
"THERE IS NO SPOON"

AMD 6300 6 core 3.5 ghz, Windows 8.1, 8GB ram, GTX 650 2GB ram

Login to post a reply

Server time is: 2024-05-20 00:10:08
Your offset time is: 2024-05-20 00:10:08