|
rhayzahr Newbie
Joined: 11 May 2010 Posts: 2
|
Posted: Tue May 11, 2010 8:48 pm
Unmatched ()? |
get knife
skin corpse
#WAIT 4000
#IF (@skinjob =~ "You botch the job completely.") {sheath;#WAIT 500;search corpse;#VAR skinjob none} {sheath;#WAIT 500;fold @lefthand;#WAIT 500;open my sack;#WAIT 500;put @lefthand in my sack;#WAIT 500;%if(@skinjob =~ "That won't fit in your large deep orange canvas hunting sack",;close my sack;#WAIT 500;open my second sack;#WAIT 500;put @lefthand in my second sack;#WAIT 500;close my second sack;#WAIT 500;search corpse;#VAR skinjob none,#WAIT 500;close my sack;#WAIT 500;search corpse;#VAR skinjob none)}
unmatched parenthesis at row 4 col 282...but i thought i did it right?
PS I'm running CMUD Pro 2.37
Can anyone help? |
|
|
|
Martaigne Wanderer
Joined: 05 Jan 2002 Posts: 88 Location: Atlanta, GA
|
Posted: Tue May 11, 2010 9:14 pm |
#IF (@skinjob =~ "You botch the job completely.") {sheath;#WAIT 500;search corpse;#VAR skinjob none} {sheath;#WAIT 500;fold @lefthand;#WAIT 500;open my sack;#WAIT 500;put @lefthand in my sack;#WAIT 500;%if(@skinjob =~ "That won't fit in your large deep orange canvas hunting sack",;close my sack;#WAIT 500;open my second sack;#WAIT 500;put @lefthand in my second sack;#WAIT 500;close my second sack;#WAIT 500;search corpse;#VAR skinjob none,#WAIT 500;close my sack;#WAIT 500;search corpse;#VAR skinjob none)}
I think the bolded semicolon is your problem?
edit: Actually, this is kind of a mess. Wouldn't a #SWITCH be easier? |
|
|
|
rhayzahr Newbie
Joined: 11 May 2010 Posts: 2
|
Posted: Wed May 12, 2010 12:05 am Still a little messy |
It's still a little messy buy I seemed to find a fix with the #SWITCH idea...I don't think its what you were talking about, but I made it work lol.
get knife
skin corpse
#WAIT 4000
#IF (@skinjob =~ "You botch the job completely.") {sheath;#WAIT 500;search corpse;#VAR skinjob none} {sheath;#WAIT 500;fold @left hand;#WAIT 500;open sack;#WAIT 500;put @lefthand in my sack;#WAIT 500;#SWITCH (@skinjob =~"That won't fit in your large deep orange canvas hunting sack") {close my sack;@WAIT 500;open my second sack;#WAIT 500; put @lefthand in my second sack;#WAIT 500;close my sack;#WAIT 500;search corpse;#VAR skinjob none} {#WAIT 500; close my sack;#WAIT 500;search corpse;#VAR skinjob none}} |
|
|
|
Private Adept
Joined: 10 Jan 2002 Posts: 264 Location: USA
|
Posted: Fri May 28, 2010 6:07 am |
I pasted your original code into a test alias, 1st thing is hit CTRL-M to format it, it makes it much easier to read... then i changed the %if to a #IF...
Code: |
get knife
skin corpse
#WAIT 4000
#IF (@skinjob =~ "You botch the job completely.") {
sheath
#WAIT 500
search corpse
#VAR skinjob none
} {
sheath
#WAIT 500
fold @lefthand
#WAIT 500
open my sack
#WAIT 500
put @lefthand in my sack
#WAIT 500
#IF ( @skinjob =~ "That won't fit in your large deep orange canvas hunting sack") {
close my sack
#WAIT 500
open my second sack
#WAIT 500
put @lefthand in my second sack
#WAIT 500
close my second sack
#WAIT 500
search corpse
#VAR skinjob none
} {
#WAIT 500
close my sack
#WAIT 500
search corpse
#VAR skinjob none
}
}
|
this passes the CTRL-K Syntax check... but #WAIT is not a good idea to use so often...
i see a lot of #WAIT 500, does your mud need you to wait between commands? if so,
goto Options, General, then scripting... set delay to 500...
then your code can become...
Code: |
get knife
skin corpse
#ALARM +4 {#IF (@skinjob =~ "You botch the job completely.") {
sheath
search corpse
#VAR skinjob none
} {
sheath
fold @lefthand
open my sack
put @lefthand in my sack
#IF ( @skinjob =~ "That won't fit in your large deep orange canvas hunting sack") {
close my sack
open my second sack
put @lefthand in my second sack
close my second sack
search corpse
#VAR skinjob none
} {
close my sack
search corpse
#VAR skinjob none
}
}
}
|
the settings change eliminates all the #WAIT 500's, and the initial 4 second wait becomes a one time alarm
dunno why the %if was used in the 2nd part, but changing it to a normal #IF worked, dunno enough about your mud or even which it is to know if it works though :P |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Fri May 28, 2010 1:09 pm |
That's correct--a commandline should not start with a function, like %if, or anything else that starts with %.
|
|
|
|
|
|