Tenderfoot Thahd Azzie Posted December 23, 2011 Share Posted December 23, 2011 Well, this is kind of embarrassing, several problems for one scenario. I'm still working on the same scenario as in my prior thread, but i keep getting these scripting errors! I'm trying to make it so when the party searches a wheel, it asks them if they'd like to turn it. If they say yes, it turns on a stuff done flag. but when i tested it, it gave me error message saying: gatelever(The script) error: missing = in line 25. here's the actual script: (It contains spoilers of my scenarios, so judges may not want to read it.) Click to reveal.. beginterrainscript; variables; short y/n = 0; body; beginstate INIT_STATE; break; beginstate START_STATE; break; beginstate SEARCH_STATE; reset_dialog(); add_dialog_str(1,"Before you is an old, rusty wheel that looks like it hasn't been used for a very long time.",0); add_dialog_str(2,"Whoever built this here went to alot of trouble to hide it, especialy since the bandits couldn't find it.",0); add_dialog_str(3,"Its obviously very important.",0); add_dialog_str(4,"Would you like to turn it?",0); add_dialog_choice(0,"Of course!"); add_dialog_choice(1,"Nah."); y/n = run_dialog(1); //This is line 25 if (y/n == 1);{ set_flag(3,0) = 1; play_sound = 99; reset_dialog(); add_dialog_str(1,"Its amazingly easy to turn!",0); run_dialog(1); } else;{ reset_dialog(); add_dialog_str(1,"Probably a wise choice.",0); run_dialog(1); } break; can anyone help me? Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Dintiradan Posted December 23, 2011 Share Posted December 23, 2011 The error is probably in Code: short y/n = 0; You can only use certain characters in variable names (in pretty much any programming language, the allowed characters are letter, numbers, and underscores). Try changing the variable name from 'y/n' to something like 'y_or_n'. (The '/' character means division.) Quote Link to comment Share on other sites More sharing options...
Rotghroth Rhapsody BJ Back From the Beyond Posted December 23, 2011 Share Posted December 23, 2011 Dintinadan's probably right. I've never tried that before, so I really don't know. However, I did spot four other mistakes. Line 26: Remove the semicolon after the if statement. Line 27: Should be "set_flag(3,0,1);" Line 28: Should be "play_sound(99);". Line 33: Remove the semicolon after "else". Don't feel to bad about having lots of errors. Even experienced designers get their fair share of errors while writing a scenario. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted December 23, 2011 Share Posted December 23, 2011 Remeber that Alint can stop a lot of mistakes. Alint Error Quote Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted December 24, 2011 Share Posted December 24, 2011 Alint saved my life as I made scenarios. Quote Link to comment Share on other sites More sharing options...
Tenderfoot Thahd Azzie Posted December 29, 2011 Author Share Posted December 29, 2011 I have a new problem. when you get to a certain spot in one of my dungeons, the game suddenly crashes, displaying a window saying "Unhandled Exception Unhandled Exception: c0000005 At address: 00439ac0" i looked the glitch up in the docs but it wasn't one of the listed glitch's, which leads me to believe that its not my fault. Whos fault this is i don't know, but i can't finish my scenario until its faxed(edit: FIXED! I'm sorry for the misspelling!). so can anyone help?! Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Niemand Posted December 30, 2011 Share Posted December 30, 2011 There are some of these which aren't listed in any official documentation. It's usually combination of a bug in your script and a bug in the game (which ought to give you a clear message about the problem and stop the script, rather than crashing). Take a look at this post, particularly under the heading for Unhandled Exceptions. Then look around your scripts and see if you can connect the problem to one of the ones listed there. In the worst case, you may have to fall back on commenting out large swathes of your script, using bisection to locate the part that actually causes the crash. Hopefully it won't come to that, though. Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Enraged Slith Posted December 30, 2011 Share Posted December 30, 2011 If you're still having trouble with it, you can always PM me or post the naughty section of script that causes your problem. Quote Link to comment Share on other sites More sharing options...
Tenderfoot Thahd Azzie Posted December 30, 2011 Author Share Posted December 30, 2011 I looked over the post, but it didn't really help because its not crashing when trying to activate custom code, it seems to be happening whenever the player gets to x coordinate 15. this is very strange, as the custom code i wrote doesn't do anything in these places! Quote Link to comment Share on other sites More sharing options...
Tenderfoot Thahd Azzie Posted December 30, 2011 Author Share Posted December 30, 2011 I solved the problem, thanks! and i learned not to make buildings out of cliffs. Quote Link to comment Share on other sites More sharing options...
Tenderfoot Thahd Azzie Posted January 9, 2012 Author Share Posted January 9, 2012 I'm very close to finishing, (Maybe as soon as tomorrow, but most likely not.) but when i do finish, I'm wondering if I'll have time to have it beta-tested by others before the contest ends. I can beta-test it myself, but I hear that would be very unreliable. If I decide to have it beta tested, I post the beta scenario here. Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast *i Posted January 10, 2012 Share Posted January 10, 2012 Quote: If I decide to have it beta tested, I post the beta scenario here. While I've been out of the scenario design game for quite some time, I can assure you that beta testing is imperative. Everyone misses or does not realize things when they write a scenario and having other people play it and break things is the only way to find them. Trust me. Far better than to test and miss the contest deadline than submit a broken scenario. Quote Link to comment Share on other sites More sharing options...
Magnificent Ornk nikki. Posted January 10, 2012 Share Posted January 10, 2012 Originally Posted By: Azzie I'm very close to finishing, (Maybe as soon as tomorrow, but most likely not.) but when i do finish, I'm wondering if I'll have time to have it beta-tested by others before the contest ends. I can beta-test it myself, but I hear that would be very unreliable. If I decide to have it beta tested, I post the beta scenario here. If you do finish it in time, email it to me at nikkisjeffery(at)hotmail (dot) co.uk. I've got a bit of free time before school starts again, so I'll probably be able to look it over and return some feedback in about a day (providing the scenario isn't 80 towns big). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.