Problem 'Unknown command you in line 41'

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: Problem 'Unknown command you in line 41'
Shock Trooper
Member # 3276
Profile #0
'Unknown command you in line 41'
I counted the lines 15 times. Line 41 is blank. Is this a bug? I even checked the whole text doc. NO command starts with you. This makes no sense.
Posts: 249 | Registered: Saturday, July 26 2003 07:00
Infiltrator
Member # 169
Profile #1
Search for that string. The line count is a bit buggy. (At least in Windows.)
Posts: 422 | Registered: Tuesday, October 16 2001 07:00
Shock Trooper
Member # 3276
Profile #2
I have a Mac, and id say that it is buggy there too. I cant find any commands that start with you. The only sentances that contain the word You are the message_dialog["You blah",""]
This is totally weird.
Posts: 249 | Registered: Saturday, July 26 2003 07:00
Agent
Member # 2820
Profile #3
Could you post the script? And I hope those [] are () in your script. The line numbers are extremely messed up; but slowly combing the script would help.

--------------------
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 #4
I did use () instead [], but for some reason last time I tried to posts something with ( ) in it it said HTML not enabled. Hopefully I can use UBB code correctly to post my script... I didn't see any problems the script, so maybe you could spot something.
begintownscript;

variables;

int i,j,k,choice;

body;

beginstate INIT_STATE;
set_crime_tolerance(1);
i = 0;
break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
break;

beginstate 10;
message_dialog("You spot a small building, that has a very old label, that says old treasure chamber.""This looks like a good place to loot. After all, the box on the other end of the chamber readsgold.");
break;

beginstate 11;
reset_dialog();
add_dialog_str(0,"You notice a lever in this small hallway. Do you wish to pull it?",0);
add_dialog_choice(0,"Leave");
add_dialog_choice(1,"Pull Lever");
choice = run_dialog(1);
if (choice == 1);
end();
if (choice == 2);
flip_terrain(37,37);
flip_terrain(33,38);
message_dialog("You hear the sounds of metal clancking on stone.","");
break;

beginstate 12;
if (i < 4) {
block_entry(1);
message_dialog("You try to cross, but the rune repels you. You cant get through here now.","");
}
if (i = 4)
set_state_continue(13);
if (i > 4) {
damage_near_loc(38,23,50,4,1);
message_dialog("You set the power too high!","The floor begins spreading a sonar heat wave 4 spaces in every direction of the blue tile! Get out of there!");
block_entry(1);
}
break;

beginstate 13;
message_dialog("You step over the floor. Instead of blocking you, it alows you to pass, and take what is inside the crystal container. And to top it off, the gates over to the west open!","You open the container, and good lord! It is a golden pig!_To take the item, search the container and grab it.");
block_entry(0);
flip_terrain(30,22);
break;

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;
}
break;

beginstate 21;
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,25);
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;
}
break;

beginstate 22;
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,26);
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;
}
break;

beginstate 23;
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,27);
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;
}
break;

beginstate 24;
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,28);
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;
}
break;

beginstate 25;
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,29);
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;
}
break;

Posts: 249 | Registered: Saturday, July 26 2003 07:00
Shock Trooper
Member # 4000
Profile Homepage #5
"You spot a small building, that has a very old label, that says old treasure chamber.""This looks like a good place to loot. After all, the box on the other end of the chamber readsgold."Try putting a "," in between the two quotation marks. That's one of the things I noticed. I actually can't see anything else wrong with it although there might be something else...hmm.

--------------------
♫ The truth is screaming BIG ♫
♫ A light so bright ♫
♫ Whether day or night ♫
It can't be hid

§ realitycorp@gmail.com §

►► Chance is back online! ◄◄
Posts: 245 | Registered: Tuesday, February 17 2004 08:00
Shock Trooper
Member # 3276
Profile #6
I did put the comma between the quotes, and you said nothing else is wrong.
The computer thinks differently :eek:
bad term in expression in line 77.

EDIT= I did find an expression with an ill placed semi_colon next to line 77, but I fixed, reloaded, exited and re-entered town, and the problem persist. Btw it only shows that error message when a walk over to a lever I need to turn.

[ Wednesday, June 23, 2004 08:33: Message edited by: GIFTSare2nice ]
Posts: 249 | Registered: Saturday, July 26 2003 07:00
Off With Their Heads
Member # 4045
Profile Homepage #7
If you're counting lines and you're on a Mac, I'm guessing you're using TextEdit. My first recommendation is to stop using that program. I used to use it, and it took me ten times as long to debug. Get BBEdit Lite. There's a link around here somewhere, and you can just do a search on it, too. Jeff uses BBEdit (the real version, not Lite) and the line numbers match with that. They DON'T match with things like Word, and as far as I know, TextEdit doesn't do line counts.

To transfer a text document between TextEdit and BBEdit Lite, you may have to open it up in TextEdit, copy it, and then paste it into BBEdit Lite.

Anyway, once you've done that, this looks like a problem with a quotation mark being missing somewhere. I'd look at line 41, and if it contains a string, make sure that the quotes that begin and end it are properly placed. If it doesn't contain a string, or if the quotes are correct, check if it contains the word "you." If it does, a string above it probably doesn't have proper end quotes. Check the strings nearby and above.

Beyond that, I don't know.

--------------------
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
Shock Trooper
Member # 3276
Profile #8
Thanks. Im downloading BBEdit Lite right now. Ill report if I still have problems.
Posts: 249 | Registered: Saturday, July 26 2003 07:00
Shock Trooper
Member # 3276
Profile #9
Now it says bad term in expression in line 78, which is...

72 beginstate 21;
73 reset_dialog();
74 add_dialog_str(0,"You notice a small power lever on the floor. Should you pull it?",0);
75 add_dialog_choice(0,"Leave");
76 add_dialog_choice(1,"Pull Lever");
77 if (choice = 1)
78 end();
79 if (choice = 2) {
80 flip_terrain(39,25);
81 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.");
82 i + 1;
83 }
84 break;
I think the reason the line counting was a problem in text_edit was because the wider the window, the more or less lines are needed to fit text, changes the line numbers. BBEdit does not do that.
Posts: 249 | Registered: Saturday, July 26 2003 07:00
Off With Their Heads
Member # 4045
Profile Homepage #10
Should be
if (choice == 1)
and
if (choice == 2)

--------------------
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
Shock Trooper
Member # 3276
Profile #11
I keep geting the stuff that uses either one or two equal signs mixed up. Thanks man.
But it still shows errors, which I dont understand
Bad Expression in line 44 (Forgive me, only second day at scripting stuff. I dont understand much.)
38 beginstate 12;
39 if (i < 4) {
40 block_entry(1);
41 message_dialog("You try to cross, but the rune repels you. You cant get through here now.","");
42 }
43 if (i = 4) {
44 set_state_continue(13);
45 }
46 if (i > 4) {
47 damage_near_loc(38,23,50,4,1);
48 message_dialog("You set the power too high!","The floor begins spreading a sonar heat wave 4 spaces in every direction of the blue tile! Get out of there!");
49 block_entry(1);
50 }
51 break;

Posts: 249 | Registered: Saturday, July 26 2003 07:00
Shock Trooper
Member # 4000
Profile Homepage #12
Again, if testing equality, the format is if (i == 4)

So change that in line 43 and line 44 should work.

EDIT: Thought I should add this in- there is a difference between assigning a number (=) and checking the assigned variable for the number (==). Assigning a variable means to store a number/string/boolean in a variable. Consider the following code:

v = 5 //v now has a number of five.
if (v == 5) { //check if v is five
v = 6 //if v == 5, then assign a 6 to it
}
So if you are assigning a number into a variable, use (=). If you are checking equality, use (==).

[ Wednesday, June 23, 2004 11:05: Message edited by: Block ]

--------------------
♫ The truth is screaming BIG ♫
♫ A light so bright ♫
♫ Whether day or night ♫
It can't be hid

§ realitycorp@gmail.com §

►► Chance is back online! ◄◄
Posts: 245 | Registered: Tuesday, February 17 2004 08:00
Shock Trooper
Member # 3276
Profile #13
Thanks, my script has no errors anymore.

EDIT: Now I understand. Thanks man.

[ Wednesday, June 23, 2004 11:36: Message edited by: GIFTSare2nice ]
Posts: 249 | Registered: Saturday, July 26 2003 07:00