Dialoge script error.
Author | Topic: Dialoge script error. |
---|---|
Canned
Member # 8014
|
written Friday, January 18 2008 15:37
Profile
I keep getting this error in the dialog script, and it isn't being specific. It just says "Dialogue script error: in line 43". I just can't figure it out. I've tried everything. Here is the part of the script I am pretty sure it is around. -------------------- Don't judge a sentence until you know all the words. Muffins n' Hell|Muffins n' Hell: The Muffins Are Back Again Muffins n' Hell: The End is Near Not in your shed -We are sort of done. Helpful criticism is welcome. Everyone, just call me Iffy. Please. Be grateful you have your unsellabe trowels -Goldenking Just so you know, I am working on Muffins n' Hell the scenario. Posts: 1799 | Registered: Sunday, February 4 2007 08:00 |
Law Bringer
Member # 4153
|
written Friday, January 18 2008 16:09
Profile
Homepage
Wow, that's broken. So, some pointers. The way you make dialog nodes only appear once is through condition statements. (Look this up in the docs) It uses a line like: condition = get_flag(0,23) == 1; But the only time you should be using if-statements in a dialog script is in the code section.Two, you need more line breaks, because there were a couple of things that wound up on the same line. Generally speaking, give each chunk of the node its own line. Three, I caught a stray parenthesis after a text segment. Fourth, I corrected some spelling errors. I think that's all. [ Friday, January 18, 2008 16:13: Message edited by: Ephesos ] -------------------- TM: "I want BoA to grow. Evolve where the food ladder has rungs to be reached." Gamble with Gaea, and she eats your dice. Posts: 4130 | Registered: Friday, March 26 2004 08:00 |
Shaper
Member # 7472
|
written Friday, January 18 2008 16:19
Profile
Homepage
Several problems with the dialogue script. 1. The code line goes on an individual line. For example, instead of: It should instead read like this: 2. If you want to display a node only if a certain condition is met, you use the condition field instead of an if operator. You also don't use brackets with it. So this: should look like this: 3. All non-dialogue code done in dialogue nodes must be done using a code field, like the one that toggles the quest in node 6. I suspect that you may have been trying to use a dialogue action here, which takes place in the action field. So instead of this: It should look like either this: or this: The latter of the two options is quicker and cleaner to use, but it really comes down to personal preference. EDIT: Ephesos beat me to it. [ Friday, January 18, 2008 16:20: Message edited by: Nioca ] -------------------- Hz'ii'zt a'iiencf coxnen a'bn'z'p pahuen yzpa'zuhb be'tt'phukh'kn az'ii'ova mxn't bhcizvi'fl? Nioca's Citadel - A resource for BoA graphics and scripts, as well as my scenarios. In Last Hope's Light RP - The end is near... Posts: 2686 | Registered: Friday, September 8 2006 07:00 |
Canned
Member # 8014
|
written Friday, January 18 2008 16:27
Profile
...wow. I really messed up. Is this common among new scripters? Oh, and it worked. Thank you. -------------------- Don't judge a sentence until you know all the words. Muffins n' Hell|Muffins n' Hell: The Muffins Are Back Again Muffins n' Hell: The End is Near Not in your shed -We are sort of done. Helpful criticism is welcome. Everyone, just call me Iffy. Please. Be grateful you have your unsellabe trowels -Goldenking Just so you know, I am working on Muffins n' Hell the scenario. Posts: 1799 | Registered: Sunday, February 4 2007 08:00 |
Off With Their Heads
Member # 4045
|
written Friday, January 18 2008 16:29
Profile
Homepage
quote:Yes. Oh, yes. It just takes some practice. [ Friday, January 18, 2008 16:29: Message edited by: Kelandon ] -------------------- Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens. Smoo: Get ready to face the walls! Ephesos: In conclusion, yarr. Kelandon's Pink and Pretty Page!!: the authorized location for all things by me The Archive of all released BoE scenarios ever Posts: 7968 | Registered: Saturday, February 28 2004 08:00 |
Lifecrafter
Member # 6193
|
written Friday, January 18 2008 16:30
Profile
Homepage
Consider using Niemand's Dialog Editor if you're having problems. It's good to learn this stuff for yourself, but it's a great program from what I saw, and using it means there's one less thing to worry about when you're learning averscript. -------------------- "NOW PASS ME MY BOOTS. I HAVE AN APPOINTMENT WITH A FACE." -Nikki Frostbite: Get It While It's...... Hot? Posts: 900 | Registered: Monday, August 8 2005 07:00 |
Canned
Member # 8014
|
written Friday, January 18 2008 16:41
Profile
Uh, the computer I am using is kind of slow and I don't like putting more and more on it. Oh, and I am experiencing more problems. The dialog option isn't coming, even though I stepped into the place that set the flag that the dialog requires to view that option. Part sdf is set And... I don't see anything wrong. -------------------- Don't judge a sentence until you know all the words. Muffins n' Hell|Muffins n' Hell: The Muffins Are Back Again Muffins n' Hell: The End is Near Not in your shed -We are sort of done. Helpful criticism is welcome. Everyone, just call me Iffy. Please. Be grateful you have your unsellabe trowels -Goldenking Just so you know, I am working on Muffins n' Hell the scenario. Posts: 1799 | Registered: Sunday, February 4 2007 08:00 |
Off With Their Heads
Member # 4045
|
written Friday, January 18 2008 16:54
Profile
Homepage
Reverse the order of the move_to_new_town() and the set_flag(). The town script stops running after a move_to_new_town(). -------------------- Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens. Smoo: Get ready to face the walls! Ephesos: In conclusion, yarr. Kelandon's Pink and Pretty Page!!: the authorized location for all things by me The Archive of all released BoE scenarios ever Posts: 7968 | Registered: Saturday, February 28 2004 08:00 |
Law Bringer
Member # 4153
|
written Friday, January 18 2008 17:03
Profile
Homepage
Also, you don't need the parentheses in the condition line (don't ask me why). It can just be: condition = get_flag(0,23) == 1; -------------------- TM: "I want BoA to grow. Evolve where the food ladder has rungs to be reached." Gamble with Gaea, and she eats your dice. Posts: 4130 | Registered: Friday, March 26 2004 08:00 |
Shock Trooper
Member # 10488
|
written Friday, January 18 2008 17:55
Profile
quote:But that requires a Mac, doesn't it? Also, this thread is stretching my screen a lot. :( [ Friday, January 18, 2008 17:57: Message edited by: Celtic Minstrel ] Posts: 334 | Registered: Friday, September 14 2007 07:00 |
Canned
Member # 8014
|
written Friday, January 18 2008 18:00
Profile
quote:Oh, yes. That makes perfect sense, yet I didn't think of that. It works now. And sorry about the screen stretch, I don't know how to prevent that. -------------------- Don't judge a sentence until you know all the words. Muffins n' Hell|Muffins n' Hell: The Muffins Are Back Again Muffins n' Hell: The End is Near Not in your shed -We are sort of done. Helpful criticism is welcome. Everyone, just call me Iffy. Please. Be grateful you have your unsellabe trowels -Goldenking Just so you know, I am working on Muffins n' Hell the scenario. Posts: 1799 | Registered: Sunday, February 4 2007 08:00 |
Agent
Member # 8030
|
written Friday, January 18 2008 18:16
Profile
Homepage
It's okay Iffy, scripts stretch the screen in any format. -------------------- I dub thee... Posts: 1384 | Registered: Tuesday, February 6 2007 08:00 |
Infiltrator
Member # 5576
|
written Friday, January 18 2008 18:34
Profile
Homepage
There is also a Windows version of the Dialogue Editor. (It's source code, regretably, is lost, but the existing version should work fine.) -------------------- Überraschung des Dosenöffners! "On guard, you musty sofa!" Posts: 627 | Registered: Monday, March 7 2005 08:00 |
Lifecrafter
Member # 6193
|
written Friday, January 18 2008 18:37
Profile
Homepage
quote:No, there's a windows version too. -------------------- "NOW PASS ME MY BOOTS. I HAVE AN APPOINTMENT WITH A FACE." -Nikki Frostbite: Get It While It's...... Hot? Posts: 900 | Registered: Monday, August 8 2005 07:00 |
Canned
Member # 8014
|
written Saturday, January 19 2008 08:13
Profile
I prefer to type the scripts rather than use the dialog editor. Okay, so I have added more nodes, yet I am having more problems. It says "error: Improper block definer in line 75". And I have done what seems to be right, and I have checked what I have done over and over, yet I don't detect anything wrong. -------------------- Don't judge a sentence until you know all the words. Muffins n' Hell|Muffins n' Hell: The Muffins Are Back Again Muffins n' Hell: The End is Near Not in your shed -We are sort of done. Helpful criticism is welcome. Everyone, just call me Iffy. Please. Be grateful you have your unsellabe trowels -Goldenking Just so you know, I am working on Muffins n' Hell the scenario. Posts: 1799 | Registered: Sunday, February 4 2007 08:00 |
Shaper
Member # 7472
|
written Saturday, January 19 2008 08:30
Profile
Homepage
You don't stick bread; after conditions. -------------------- Hz'ii'zt a'iiencf coxnen a'bn'z'p pahuen yzpa'zuhb be'tt'phukh'kn az'ii'ova mxn't bhcizvi'fl? Nioca's Citadel - A resource for BoA graphics and scripts, as well as my scenarios. In Last Hope's Light RP - The end is near... Posts: 2686 | Registered: Friday, September 8 2006 07:00 |
Canned
Member # 8014
|
written Saturday, January 19 2008 08:52
Profile
bread; :P I wasn't aware of the fact that you don't stick break; after a condition, I was under the impression that I do. Well, it works now thanks. -------------------- Don't judge a sentence until you know all the words. Muffins n' Hell|Muffins n' Hell: The Muffins Are Back Again Muffins n' Hell: The End is Near Not in your shed -We are sort of done. Helpful criticism is welcome. Everyone, just call me Iffy. Please. Be grateful you have your unsellabe trowels -Goldenking Just so you know, I am working on Muffins n' Hell the scenario. Posts: 1799 | Registered: Sunday, February 4 2007 08:00 |
Shaper
Member # 7472
|
written Saturday, January 19 2008 08:58
Profile
Homepage
No, I have no idea how I made that typo either, but it was too good to remove. So there. :P 'Sides, you got the idea, right? -------------------- Hz'ii'zt a'iiencf coxnen a'bn'z'p pahuen yzpa'zuhb be'tt'phukh'kn az'ii'ova mxn't bhcizvi'fl? Nioca's Citadel - A resource for BoA graphics and scripts, as well as my scenarios. In Last Hope's Light RP - The end is near... Posts: 2686 | Registered: Friday, September 8 2006 07:00 |
Canned
Member # 8014
|
written Saturday, January 19 2008 09:26
Profile
Actually at first when I read that I thought I made a typo in the script, then I realized you made a typo. But ya, it is all right now. -------------------- Don't judge a sentence until you know all the words. Muffins n' Hell|Muffins n' Hell: The Muffins Are Back Again Muffins n' Hell: The End is Near Not in your shed -We are sort of done. Helpful criticism is welcome. Everyone, just call me Iffy. Please. Be grateful you have your unsellabe trowels -Goldenking Just so you know, I am working on Muffins n' Hell the scenario. Posts: 1799 | Registered: Sunday, February 4 2007 08:00 |
Agent
Member # 8030
|
written Saturday, January 19 2008 13:44
Profile
Homepage
quote:When I first saw that, I thought someone was mentioning the band by the name of Bread. -------------------- I dub thee... Posts: 1384 | Registered: Tuesday, February 6 2007 08:00 |
Shock Trooper
Member # 10488
|
written Saturday, January 19 2008 18:39
Profile
Avoiding screen stretch: Why don't you just put some line breaks in the really long lines? It won't run with the line breaks in, but at least it doesn't stretch the screen. It'll usually be obvious where you need to take out line breaks for it to run – any line break within a string must go. Has anyone tested to see if a backslash at the end of a line works as a continuation character as in Python? I would guess not, but if it does, that would be even better. Posts: 334 | Registered: Friday, September 14 2007 07:00 |
Shaper
Member # 7472
|
written Saturday, January 19 2008 20:29
Profile
Homepage
I've seen a single conditional broken up over multiple lines. Like so: -------------------- Hz'ii'zt a'iiencf coxnen a'bn'z'p pahuen yzpa'zuhb be'tt'phukh'kn az'ii'ova mxn't bhcizvi'fl? Nioca's Citadel - A resource for BoA graphics and scripts, as well as my scenarios. In Last Hope's Light RP - The end is near... Posts: 2686 | Registered: Friday, September 8 2006 07:00 |
Shock Trooper
Member # 10488
|
written Sunday, January 20 2008 06:18
Profile
That's because AvernumScript is like C in that line break is treated the same way as a space or tab. But suppose you tried to put a line break in the middle of a string? It's the long strings that are causing the screen to stretch. Posts: 334 | Registered: Friday, September 14 2007 07:00 |