Jump to content

New problem


Recommended Posts

Okay, so my old scenario was having too many problems, and would have sucked if I had gone through with it. I wasn't even going to publish it; it was just for practice. But now that I've read through all of the calls in the appendix, I'm ready for something real.

So I have started a new scenario, and already run into a problem. I have a dialogue. You talk to a guy, and he says he needs you for a favor. So you ask what he wants, and he explains. Then you accept the quest, and it opens State 2. Then it's supposed to give you a quest. The error message is: State not found-2.

Now, rewind a bit. When you click the question in state -1, it doesn't go to state 1, it just ends the conversation. I'm sure that the nextstate is right, and I don't see another explanation.

 

I would prefer to keep the storyline secret, so this script is different:

 

Code:
begintalkscript;begintalknode 1;state = -1;nextstate = 1;text1 = "You are talking to a man. _Welcome. I have a task for you._";begintalknode 2;state = 1;nextstate = 2;question = "What do you want?";text1 = "Someone has taken my Royal Saphire.";begintalknode 3;state = 2;nextstate = -1;question = "You wish me to recover this gem?";text1 = "Yes. And when you are done, return to me. I have more for you to do.";code =	toggle_quest(1,1);break;
Link to comment
Share on other sites

1) What do you mean by 'opening' a state?

2) Why don't you give the quest by putting the code to do so in the code section of the node where the party agrees to do the quest?

3) What do you mean by a question being 'in' state -1? Do you mean the question of a node whose state is -1 and whose nextstate is 1, or do you mean the question of a node whose state is 1, viewed from a node whose state is -1 and whose nextstate is 1?

Link to comment
Share on other sites

Quote:
What do you mean by 'opening' a state?

I never used that phrase.
Quote:
Why don't you give the quest by putting the code to do so in the code section of the node where the party agrees to do the quest?

So I should put it before the text? Didn't change anything.
Quote:
What do you mean by a question being 'in' state -1? Do you mean the question of a node whose state is -1 and whose nextstate is 1, or do you mean the question of a node whose state is 1, viewed from a node whose state is -1 and whose nextstate is 1?

The node's state is set to -1, the nextstate to 1.
Quote:
You're missing dialogue actions. This is the only thing I really see missing from your script.

My dialogues worked before without those. I doubt it's that.
Quote:
The first node is also missing a question. I'm not sure if this is what is causing your problem (or if it's a problem at all) but I'd include one just to be sure.

This is definitely not the problem, but I'll try anyway. I second that.

Link to comment
Share on other sites

Well, considering that you've said that none of my suggestions will make any difference, I've got two more suggestions.

 

You mentioned that the script you posted was different than the actual script. The problem is, there could be (and most likely there is) a problem with the actual dialogue script. You might have run over the character limit, for instance, or typed in a state wrong, or missed a semi-colon somewhere, or even mispelled something. Since you don't want to spoil the story, I would suggest going to Niemand's website, downloading the incredibly awesome dialogue editor, and using it from now on. It not only makes organizing dialogue easier, it catches some of the more common problems and is fairly idiot proof (no chance of missing semi-colons or misspelling important commands.)

 

If the problem isn't your dialogue, then I suspect it has to do something with the quest in your scenario script. Make sure everything is written correctly.

Link to comment
Share on other sites

Okay, this is really stressing me out. I tried everything and more to fix this, but it just won't work. I tried another dialogue without a quest and that didn't work either. I'm about ready to scrap this scenario idea too. I tried the editor; it was cool, but what exactly was it supposed to do? I'm sorry, but I've been working since I got home, and made no progress whatsoever!

</Annoyed rantings>

Link to comment
Share on other sites

Okay, I fixed it. I hope you don't mind me posting what was wrong in here.

 

The main problem with your scripts was your formating. In every single script that you use calls in, whether you utilize them or not, you've got to declare your variables. It's essentially:

begin<script>;

variables;

body;

etc...

 

The other problem was the fact that you didn't complete your basic town script. Town scripts don't work until you include all their basic states, whether you put any calls in them or not. That is, you need an INIT_STATE, a START_STATE, and an EXIT_STATE. Always include them, even if the only thing to come after them is a "break;".

 

Finally, you put a set_name call in your dialogue script. This didn't have anything to do with your problem, but that call is generally reserved for init_state's.

 

Try fixing those. If you still can't get it to work, I'll personally send you the changes.

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.

 Share

×
×
  • Create New...