forums

TNT Basic Forums > Bugs!
Can't test my game
< Last Thread     Next Thread >
Author
Thread        Post A Reply

09-26-2006 16:32

Posted by:
Orteil

Location:
Somewhere in France

Find more posts by Orteil

I'm developping a text game where you get a job, buy a home and furnitures, with lots of text (and a little sound).
The code is starting to get very long (because of all the data) and now, when I test the game, Hieroglyph freezes (TNT basic starts, then automatically quits; I can switch to other applications but can't do anything with Hieroglyph) and it warns me a few mins later that "The TNT Basic program could not be run; the TNT Basic program is not responding".
I guess there is a bug in my code, but Hieroglyph does not want to debug it and seems to prefer crashing instead.

I hope somebody will answer me...

09-26-2006 21:05

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

The biggest question, now, is:

does your program run at all?

You could test by writing 'print "running"' at the first line, for instance, and see if the line is printed.

If it runs for some time then crashes, it's probably a bug in both your code and TNT Basic. That would mean you introduced some error, but TNT isn't able to pick it up cand crashes. In this case, you could try to narrow down where the crash happens with various "print" commands, or by logging to a file.

If your program doesn't run at all, then it is TNT's fault, and i'd need Mark to answer. It could maybe be a corrupt image/sound/music (but you said it's a text game...)

Indentifying what you did right before it started crashing could probably help.

Also, you could try sending the file to me, so i can see if it also crashes on my computer.

09-27-2006 11:12

Posted by:
Orteil

Location:
Somewhere in France

Find more posts by Orteil

Oh ?

I tried to make it work with a Print and it freezed again. TNTbasic must have a problem.
The last thing I added was a procedure used to identifiate the gender of a word (like we use in french, but you're from Quebec, right ?) - here is the code :



procedure mot(str st1,str typ)'<--- where st1 is the string to test, like "le ragondin" ou "le'ectoplasme" and typ is what kind of word I want the pronoun to be (like "un", "le" or "de").

if left str(st1,3)="le "
if typ="un" then tx1="un "+right str(st1,str length(st1)-3)
if typ="le" then tx1="le "+right str(st1,str length(st1)-3)
if typ="d'" then tx1="d'un "+right str(st1,str length(st1)-3)
else if left str(st1,3)="la "
if typ="un" then tx1="une "+right str(st1,str length(st1)-3)
if typ="le" then tx1="la "+right str(st1,str length(st1)-3)
if typ="d'" then tx1="d'une "+right str(st1,str length(st1)-3)
else if left str(st1,3)="le'"
if typ="un" then tx1="un "+right str(st1,str length(st1)-3)
if typ="le" then tx1="l'"+right str(st1,str length(st1)-3)
if typ="d'" then tx1="d'un "+right str(st1,str length(st1)-3)
else if left str(st1,3)="la'"
if typ="un" then tx1="une "+right str(st1,str length(st1)-3)
if typ="le" then tx1="l'"+right str(st1,str length(st1)-3)
if typ="d'" then tx1="d'une "+right str(st1,str length(st1)-3)
end if

end proc



...then tx1 is a global var, so I can use it to make some real-looking sentences in french (like "Vous avez trouvé une banane" instead of "Vous avez trouvé un banane", which is hard to stand for a guy who choosed to study litteracy).

I remmed it all so I hope it's not a corrupted file. (I said there was some sound.)
Resources bugs are very annoying, they already have killed some of my projects and I haven't found any way of avoiding them but saving as copy, again and again, each time I make a minor modification.

I'm sending you the bugging game and the copy of the working one (before I added the stuff).
Thanks !

09-27-2006 17:17

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

(yes i speak french =) though i'll stick to english since it's an english forum and you seem to understand english fairly well)

i couldn't open the files you sent me =( i suspect it's because they're mac resource files, and hotmail is a windows server (mac resource files get corrupt if passed on anything but a mac i believe)

so you should probably zip/stuff them and try again

and BTW, if you have an old cop that works, you could try commenting out the new code until the program runs again (and if it doesn't then it's probably a corruption problem...), and then uncomment a few lines at a time and see when it starts crashing (to narrow down where the error is)

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.