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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
TesterOfLimitz
Novice


Joined: 02 Jun 2007
Posts: 37

PostPosted: Fri Jun 15, 2007 6:07 am   

Problem with Setting a variable inside an alarm
 
So far, Ive run into this problem twice so far, and either im completely missing whats wrong, or there may be something wrong with the Syntax Checker. Ill give you one of the examples:

An alias called Autolight:
Syntax:
Code:
#if (@syssettings.needlight and @syssettings.bal and @syssettings.equil and @syssettings.templight) {
  syssettings.templight = 0
  lightpipes
  #alarm templight +.75 {syssettings.templight = 1}
  }


The problem is, the script wont compile, because it says there's an unmatched bracer in there somewhere, and places the cursor directty behind the {syssettings.templight
So I go back and check, and it seems all my bracers are in the right places. Any help?

P.S. Ive also gone back and tried using

Code:
syssettings.templight=1


but it gives me the same compile error
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Fri Jun 15, 2007 6:37 am   
 
CMUD is getting confused by the +.75. Not sure if I'd classify it as a bug since the documentation for #ALARM says you should have curly braces around the time.

Either on of these modifications will work.
Code:
#alarm templight {+.75} {syssettings.templight = 1}

Code:
#alarm templight +0.75 {syssettings.templight = 1}
_________________
Asati di tempari!
Reply with quote
TesterOfLimitz
Novice


Joined: 02 Jun 2007
Posts: 37

PostPosted: Fri Jun 15, 2007 7:04 am   
 
Brilliant mate.......I noticed the brackets around the time in the help file and didnt even think to try them out (I cant ever remember having to before, sheer assumption on my part).

Anyways, thank you very much for the speedy help!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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