TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

help with #if?

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Script Help
View previous topic :: View next topic  
Author Message
perlsaiyan



Joined: 21 Sep 2014
Posts: 21

PostPosted: Sun Jan 15, 2017 11:14 am    Post subject: help with #if? Reply with quote

I need some help understanding why an #if doesn't execute. Here's some code:

Code:

  #var lookingAtRoom;
  #if { ($lookingAtRoom == 1) } {
    syslog EXITING ROOM;
  };
  #var lookingAtRoom;
  #var lookingAtRoom 0;
  #var lookingAtRoom;
  #nop %2;


Here's the debug output when running:
Code:

[02] variable lookingAtRoom
#VARIABLE {lookingAtRoom}={1}
[10] if { (0 == 1) }
[05] endif
[02] variable lookingAtRoom
#VARIABLE {lookingAtRoom}={1}
[02] variable lookingAtRoom 0
[02] variable lookingAtRoom
#VARIABLE {lookingAtRoom}={0}


What gives, have I gone mad?
Back to top
View user's profile Send private message
perlsaiyan



Joined: 21 Sep 2014
Posts: 21

PostPosted: Sun Jan 15, 2017 12:23 pm    Post subject: Reply with quote

nevermind, this was using events.tin and was generating the code with the result of lookingAtRoom, instead of the variable itself. I moved the code into an alias, and call that with events.tin now.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Script Help All times are GMT - 5 Hours
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
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group