Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Cuthalion
Beginner


Joined: 29 Jun 2003
Posts: 18
Location: USA

PostPosted: Sat Jul 26, 2003 2:31 am   

Help with script
 
In the mud I play, boats require a ticket purchase for me and everyone on my team. Each person must have a ticket to board and if they have a horse, they must have two tickets to board. My goal with this script was to use the alias tticket to buy tickets and distribute them accordingly to everyone in my team. But I have a syntax error...

#CLASS {Team}
#ALIAS tcount {#IF (%numparam( ) > 0) {#ADDI Team {%1} #ADDK TCount {%1} {1}}}
#ALIAS unteam {#IF (%numparam( ) > 0) {#DELI Team {%1}
#DELK TCount {%1}}}
#TRIGGER {^({@Team}) * riding *} {#ADDK TCount {%1} 2}
#TRIGGER {^({@Team}) * mounts *} {#ADDK TCount {%1} 2}
#TRIGGER {^({@Team}) * dismounts *} {#ADDK TCount {%1} 1}
#TRIGGER {^({@Team}) * lands gracefully on *} {#ADDK TCount {%1} 2}
#TRIGGER {^({@Team}) * gracefully climb off *} {#ADDK TCount {%1} 1}
#CLASS 0
#VAR Horse 1
#TRIGGER {^You whisper a few words into the air} {#VAR Horse 2}
#TRIGGER {^You whisper a few words into * ear} {#VAR Horse 1}
#TRIGGER {^Whispering quietly in your * ear} {#VAR Horse 1}
#TRIGGER {^You mount *} {#VAR Horse 2}
#TRIGGER {^You dismount *} {#VAR Horse 1}
#ALIAS tticket {rc get;#LOOPDB @TCount {#IF %val = 1 {buy ticket;give ticket to %key} {buy two tickets;give two tickets to %key}};#IF @Horse = one {buy ticket} {buy two tickets};board;rc put}

this is syntax error I am getting...I cant see it

#LOOPDB @TCount {#IF %val = 1 {buy ticket;give ticket to %key} {buy two tickets;give two tickets to %key}};#IF @Horse = one {buy ticket} {buy two tickets};board;rc put
^ syntax error

Please,please HELP
Reply with quote
Cuthalion
Beginner


Joined: 29 Jun 2003
Posts: 18
Location: USA

PostPosted: Sat Jul 26, 2003 3:03 am   
 
I am stupid
I didnt put brackets around the variable in the #IF command
sorry
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net