 |
stark62 Wanderer
Joined: 04 Apr 2003 Posts: 94 Location: United Kingdom
|
|
Last edited by stark62 on Sat Feb 03, 2007 11:28 pm; edited 1 time in total |
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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 |
|
|
 |
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: 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 |
|
|
 |
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: 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 |
|
|
 |
|
|
|