 |
Talas Newbie
Joined: 07 Aug 2005 Posts: 6
|
Posted: Sun Jan 21, 2007 3:11 am
A little help with bringing a Zmud script to Cmud |
Been trying to get this thing to work in Cmud for well over a week now and still no success. Not knowing what I'm doing isn't helping too much but I've read and reread every help file I can find and still no closer to a solution.
The script is as follows, with an explanation of the problem to follow it.
Code: |
#ALIAS startmine {
#T+ mine1
#T+ mine2
minedir="%1"
mine %1
}
#TRIGGER "mine1" {You didn't find any resources.} {mine @minedir}
#TRIGGER "mine2" {You dig up * and drop it on a stack!} {mine @minedir}
#ALIAS stopmine {
#T- mine1
#T- mine2
minedir=""
}
|
The problem seems to be the %1 and Cmud, instead of it continuing along with mine e it returns a mine %1 which throws an error back from the mud. I'm at a loss how to get this to work, tried everything that I can think of and I know it's going to be something simple that is the problem. Maybe I can't see the forest for the trees as the saying goes. Any help of suggestions on this one would be very much appreciated.
Talas |
|
|
 |
Larkin Wizard

Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Sun Jan 21, 2007 3:21 am |
Don't put your %1 in quotes. CMUD treats anything inside the quotes as literal and does not expand variables. It's the way zMUD should have handled them all along, but didn't for various (nefarious) reasons.
|
|
|
 |
Talas Newbie
Joined: 07 Aug 2005 Posts: 6
|
Posted: Sun Jan 21, 2007 3:26 am |
Many thanks Larkin, took the quotes out and it worked straight away. Guess I was looking for something more complex and didn't see the simple fix.
|
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Jan 21, 2007 4:06 am |
One thing you could try in the future if scripts don't work is the compatability report on the tools menu of the package editor. It probably would've flagged this problem.
|
|
|
 |
|
|