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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
bitties
Beginner


Joined: 04 Jul 2011
Posts: 25

PostPosted: Sun Jun 19, 2022 11:13 pm   

Trying to use IF statement to complete a recall
 
Hey All-

I can't seem to get this to work. I'm trying to complete a check to complete a recall.

The plan is to have a variable called "@canrecall", and have it set to 0, and then have certain areas change the variable to 1 when recall won't work.

The part I can't seem to get to work is the IF statement.

#IF (@canrecall=0){recall};IF (@canrecall=1){enter portal}

But all I get is "the trigger fired but did not compile".

I tried to trim it to just #IF (@canrecall=0){echo success}

But that won't compile either.

Could someone tell me what I did wrong?




Disregard, not sure what I was doing wrong, but this new code works, switched the variable to a String and changed the trigger to:

#IF (@canrecall="yes") {home}
#IF (@canrecall="no") {recall}


Last edited by bitties on Mon Jun 20, 2022 12:58 am; edited 1 time in total
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4525
Location: Pensacola, FL, USA

PostPosted: Mon Jun 20, 2022 12:32 am   
 
The issue before was the lack of a space between the ) and the {
_________________
Discord: Shalimar#3679
Reply with quote
bitties
Beginner


Joined: 04 Jul 2011
Posts: 25

PostPosted: Mon Jun 20, 2022 12:58 am   
 
shalimar wrote:
The issue before was the lack of a space between the ) and the {

Thanks for the quick response!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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