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
diltoid24
Newbie


Joined: 08 Feb 2012
Posts: 7

PostPosted: Wed Feb 08, 2012 5:14 pm   

Inputting scripts
 
I primarily use zmud for a few mucks. I had it installed on my old computer and I never encountered this problem, but now I get it every time I use the program on my new system. I'm thinking there might be a setting I haven't changed, but anyway here's the problem.

Say I have a script, just a simple text file. Call it test.txt
Inside test.txt are the following lines:

lsedit test=me
.del 1 999
This is a test.
.end

If I use the input function -> Settings -> Input -> Script (ascii) it outputs the following into my zmud window:

lsedit test=me
del 1 999
This is a test.
end

The lsedit program I'm calling with the script requires the period to be in front of del and end. Does anyone know what setting to turn on or off in zmud to make it not omit the periods? Thanks!
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4690
Location: Pensacola, FL, USA

PostPosted: Wed Feb 08, 2012 6:33 pm   
 
try:

#FILE 1 test.txt
#READ 1
_________________
Discord: Shalimarwildcat
Reply with quote
diltoid24
Newbie


Joined: 08 Feb 2012
Posts: 7

PostPosted: Wed Feb 08, 2012 9:44 pm   
 
I don't quite understand. Try #file 1 test.txt where?

PS: I had to turn on parsing for that to work. #file opens a filename in the zmud directory and assigns it to variable 1 allowing #read 1 to input that filename into the data stream. No, this didn't work either, though. All this was was a more complicated way of clicking on Settings -> Input -> Script with the mouse :(
Reply with quote
diltoid24
Newbie


Joined: 08 Feb 2012
Posts: 7

PostPosted: Sun Feb 12, 2012 7:51 am   
 
Hah! Figured it out. For any with this problem, the answer lies in deselecting a certain check box located in:

View -> Preferences -> General -> Special Characters

Deselect the check beside Movement Char: .
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Mon Feb 13, 2012 5:01 pm   
 
Or put ~ in front of the . in the file.
_________________
Taz :)
Reply with quote
diltoid24
Newbie


Joined: 08 Feb 2012
Posts: 7

PostPosted: Mon Feb 13, 2012 6:26 pm   
 
I'll have to try the ~ trick. I did notice a new problem though. Now it doesn't input lined beginning with a { which is integral to most muf programer :(
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Mon Feb 13, 2012 6:41 pm   
 
{ isn't one of the characters in the Special Character list but it does mark sections of code and perhaps ~ might work in front of that too. What version of zMUD are you using?
_________________
Taz :)
Reply with quote
diltoid24
Newbie


Joined: 08 Feb 2012
Posts: 7

PostPosted: Mon Feb 13, 2012 7:29 pm   
 
Cant remember.. 7.4 or something like that..
Reply with quote
diltoid24
Newbie


Joined: 08 Feb 2012
Posts: 7

PostPosted: Mon Feb 13, 2012 11:12 pm   
 
7.21 :> I was at work earlier.
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Tue Feb 14, 2012 6:30 pm   
 
You're issue will be because it is trying to interpret the contents as a zscript script. For instance you could load a whole class of aliases, variables and triggers. Although it would seem there should be nothing wrong with loading arbitrary mud commands in this way I would suggest doing so using a valid zscript function. Surround every line in your files with #SEND "" so for instance:

#SEND "lsedit test=me"
#SEND ".del 1 999"
#SEND "This is a test."
#SEND ".end"

You will need parsing on for this to work but at least doing this would mean none of your special characters would need disabling. Use the computer icon to turn on parsing load the script and then turn it off again.
_________________
Taz :)
Reply with quote
diltoid24
Newbie


Joined: 08 Feb 2012
Posts: 7

PostPosted: Tue Feb 14, 2012 11:22 pm   
 
Ahhhh, I'll give that a try in a test script and see how it works. Thanks :>
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