Jump to content

Please help! ...again


Azzie

Recommended Posts

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?

Link to comment
Share on other sites

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.)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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).
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...