State not ended properly in Line 1.

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).
AuthorTopic: State not ended properly in Line 1.
Shock Trooper
Member # 3276
Profile #0
But line one is begintownscript!

begintownscript;

variables;

int i,j,k,choice;

body;

beginstate INIT_STATE;
break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
break;
And to top off, when I talk to someone in my town, it says that you tried to talk with no dialouge script loaded, when my doc exactly says t4surfaceRdlg and t4surfaceR. I dont understand.
Posts: 249 | Registered: Saturday, July 26 2003 07:00
Shock Trooper
Member # 4180
Profile #1
Bit of a shot in the dark (I don't have much time to explore ATM), but try shortening your file names. I don't remember the exact limit, but I know it was stingy. :)

If that's not it and no one else comes up with the answer, I'll see if I can spot the problem when I'm not quite as rushed...

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
Warrior
Member # 250
Profile #2
This is a long shot, but do the scripts have the .txt at the end of the file name. Its likely they do but if you forget then that could be causing your problems. Also you only need the .txt at the filenames in the scenario folder, when pointing to the right file in the editor you can leave the .txt out.
Posts: 61 | Registered: Saturday, November 3 2001 08:00
Shock Trooper
Member # 3276
Profile #3
thanks for the advice, but I have a text doc longer then that and it works perfectly. With exception of the .txt part, the script call in Town Details and the Name of the Txt doc are the same, and the dialouge thingy has dlg. So thats not the problem. I wished Spidweb was here.
Thanks anyway for lending advice.

EDIT: Fixed typo.

[ Thursday, June 24, 2004 18:04: Message edited by: GIFTSare2nice ]
Posts: 249 | Registered: Saturday, July 26 2003 07:00
Warrior
Member # 4492
Profile #4
I THINK, I'm never sure heh, that when theres an error, your dialogue script will not be loaded so you have to solve your error first.

Edit: Ops, I made a mistake, I thought your dialogue script was the one with the error, not your townscript. Sorry I was no help.

[ Thursday, June 24, 2004 20:06: Message edited by: Kiexcolo ]
Posts: 61 | Registered: Wednesday, June 9 2004 07:00
Post Navel Trauma ^_^
Member # 67
Profile Homepage #5
There's probably a mistake much further down. Maybe a missing break, or missing ) or }, or something. BoA is very bad about the line numbering for errors.

--------------------
Barcoorah: I even did it to a big dorset ram.

New Mac BoE
Posts: 1798 | Registered: Thursday, October 4 2001 07:00
Shock Trooper
Member # 3276
Profile #6
Ever since I started using BBEdit the line counts of everything else have ben correct. And there is nothing else wrong with the script. And for some reason, my dialouge script is not working, even though it shows no errors upon town loading.
Posts: 249 | Registered: Saturday, July 26 2003 07:00
Agent
Member # 2820
Profile #7
Do all the states and such work in your town script as normal? If they do, then there isn't a problem with the town script.

Try posting the dialogue script

--------------------
Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are.
====
Alorael: War and violence would end if we all had each other's babies!
====
Drakefyre: Those are hideous mangos.
Posts: 1415 | Registered: Thursday, March 27 2003 08:00
Shock Trooper
Member # 3276
Profile #8
I fixed the error, I forgot to delete the line numbers in BBEdit :o
But now it caused another problem, no error messages are shown, but it wont call up the correct states when the player steps on the levers. The special encounter calls the correct state but the dialog box does not open.

Geez, im always having problems. This is one of the levers, the others I copied-pasted changing only the flip terrain. So this is basicly the same as all the other levers, and none work. No error messages appear, they just are not called.
beginstate 20;
reset_dialog();
add_dialog_str(0,"You notice a small power lever on the floor. Should you pull it?",0);
add_dialog_choice(0,"Leave");
add_dialog_choice(1,"Pull Lever");
if (choice == 1)
end();
if (choice == 2) {
flip_terrain(39,24);
message_dialog("You turn the lever","It appears the lever was a power control. You hear a slight electrical discharge, and the rune symbol on the blue tile sparks. You have turned up the power a little.");
i + 1;
}

Posts: 249 | Registered: Saturday, July 26 2003 07:00
Warrior
Member # 4492
Profile #9
I can't tell whats the problem, but maybe you should use a terrain script instead, check BOA's starting scenerios for a lever script. You just have to input the x,y coords in the memory cells.
Posts: 61 | Registered: Wednesday, June 9 2004 07:00
Shock Trooper
Member # 3276
Profile #10
quote:
Originally written by Kiexcolo:

I can't tell whats the problem, but maybe you should use a terrain script instead, check BOA's starting scenerios for a lever script. You just have to input the x,y coords in the memory cells.
I did what you said, and it worked. Thanks Kiexcolo.
Posts: 249 | Registered: Saturday, July 26 2003 07:00
Off With Their Heads
Member # 4045
Profile Homepage #11
If you're curious, the issue is that you never actually run the dialog. Right after you finish adding dialog choices but before you start the ifs, you need a line that says:
choice = run_dialog(1); Otherwise the variable "choice" isn't set to anything.

[ Saturday, June 26, 2004 00:31: 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