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
Toihva
Novice


Joined: 20 Nov 2004
Posts: 38

PostPosted: Wed Jul 19, 2006 1:50 pm   

[1.03] #Alarm problems
 
Ok, I use #alarm alot for resetting some variables.

Here is what I am having trouble with:

Code:

#alarm "herbtimer" +3 {#var balherb {1}}


Any thoughts on how to fix it so it works?
Reply with quote
Dumas
Enchanter


Joined: 11 Feb 2003
Posts: 511
Location: USA

PostPosted: Wed Jul 19, 2006 3:07 pm   
 
Why the brackets around the 1?
Reply with quote
Toihva
Novice


Joined: 20 Nov 2004
Posts: 38

PostPosted: Wed Jul 19, 2006 3:42 pm   
 
not sure, works this way so why change it, unless I need to for CMUD
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jul 19, 2006 4:54 pm   
 
With the {} around the 1, CMUD will treat @balherb as a string variable instead of a numeric variable. So that might have some unintended consequences.

When you say you are "having trouble" with it, can you be more specific on exactly what isn't working? Is it giving a syntax error? or is it doing something else wrong? Please be as specific as possible with bug reports.
Reply with quote
Toihva
Novice


Joined: 20 Nov 2004
Posts: 38

PostPosted: Wed Jul 19, 2006 5:56 pm   
 
Its giving me "Error Compiling Script" and Command List Expected.


here is the entire alias

Code:
#if (@balherb AND NOT @anorexia AND NOT @stun AND NOT @aeoned AND NOT @sleeping AND NOT @transfix) {#alarm "herbtimer" +3 {#var balherb {1}};balherb = 0;outr orphine;eat orphine}


I can get the opening of it to be compiled but when it comes to the #alarm and adding options to it it starts the error part.

Zugg,

For the variable will I change the {1} to "1" or just 1?
Reply with quote
moonwlf
Novice


Joined: 14 May 2001
Posts: 33
Location: USA

PostPosted: Wed Jul 19, 2006 11:08 pm   
 
I believe quotes would still make it appear as a string. For integer or boolan variables you should not have to have to put the value in any type of quote.

Code:
#var valherb 1


As to why the alias isn't compiling that could be the reason since it is looking for a string. If you look at your if conditional test it is testing for a boolan value but it is set as a string by the alarm.


Code:
#if (@balherb AND
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