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
stark62
Wanderer


Joined: 04 Apr 2003
Posts: 94
Location: United Kingdom

PostPosted: Sat Feb 03, 2007 2:56 pm   

Healing system semi-automatic ...... add anything please
 
Stark

oops sorry get back later with this


Last edited by stark62 on Sat Feb 03, 2007 11:28 pm; edited 1 time in total
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sat Feb 03, 2007 3:32 pm   
 
Firstly, the correct way to use the var=value syntax is NOT to include the @ before it. Secondly, I assume the potion/count part is to reference the @count variable in the potion class? This syntax won't work with var=value, but you don't need it because you've already set the current class to potion. (As an aside, does anyone else appreciate how CMUD will just fail in situations like this rather than working but doing it wrong?)

In addition, you seem to have too many brackets around some of your expressions. This one for example:

#IF (((%iskey( @potions, %2)) = 0) & (%iskey( @potions, %1) = 0))

can just be

#IF (%iskey(@potions,%2)=0 & %iskey(@potions,%1)=0)
#if (!%iskey(@potions,%2) & !%iskey(@potions,%1)) if you want to be really short ;)

It probably won't cause errors in your script, but it does make it more difficult to understand with so many brackets.


Last edited by Fang Xianfu on Sat Feb 03, 2007 7:44 pm; edited 1 time in total
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Sat Feb 03, 2007 6:15 pm   
 
Stark62 If you would please send me a personal message. I'm Ramoth from Avalon and that is my code you are using.
Yes you are using and older version of it but no one was supposed to give it to you so... I would appreciate it if you didn't post it on here for example. I'll be glad to help otherwise.

Quote:

It probably won't cause errors in your script, but it does make it more difficult to understand with so many brackets.


Yeah Fang. Gurus on here can of course read it. But it was supposed to be hard to understand so it would be harder to share without my leave.

Finally would someone please remove the code he posted? As I mentioned above It is not supposed to be public.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Sun Feb 04, 2007 2:20 am   
 
Thanks stark62
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
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