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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Talas
Newbie


Joined: 07 Aug 2005
Posts: 6

PostPosted: 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
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: 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.
Reply with quote
Talas
Newbie


Joined: 07 Aug 2005
Posts: 6

PostPosted: 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.
Reply with quote
Fang Xianfu
GURU


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

PostPosted: 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.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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