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


Joined: 03 Jul 2002
Posts: 8
Location: Netherlands

PostPosted: Wed Jul 03, 2002 5:00 pm   

Easy Question?
 
Hi,
how i can the content of "%lastinput" use?
@lastinput or @%lastinput or %lastinput or _lastinput is wrong.



thanks for the help and sorry for the bad english
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Jul 03, 2002 5:06 pm   
 
%lastinput the last line of commands executed

You can treat %lastinput as a value as it is a function.

Saving that value to a variable:
#VAR V_Lastinput %lastinput

Using it when you process something. Useful
if you get a message you can trigger on and
want to know what was last entered:
#IF (%lower(%lastinput) == "look board") {#NOOP start board automatic read/store messages}



Ton Diening
Providing untested answers that tend to be
more complicated than others.
Reply with quote
karion
Newbie


Joined: 03 Jul 2002
Posts: 8
Location: Netherlands

PostPosted: Wed Jul 03, 2002 5:23 pm   
 
mhh
#VAR V_Lastinput %lastinput
The content of variable V_Lastinput is the string "%lastinput", but not the last input!

(I can only edit messages, dont kill)
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Jul 03, 2002 5:43 pm   
 
No zMud nearby but you can try and force it to expand to a variable with:

#VAR V_Lastinput [%lastinput]

Although reviewing the help files that might
not get what you want to capture. 99% of what
zMud is processing for me is not overly useful. So a la
Vijilante bad spec consideration this is what you asked about:
%lastinput the last line of commands executed

But are you looking for the last thing that zMud
processes or perhaps:

The last command you typed in:
%lastcom the last command executed
%lastcom2 the command before the last command executed
%lastcom3 the command before %lastcom2

or the last lines received:
%line the last line received from the MUD
%line2 the line before the last line received
%line3 the line before the line before the last line received

Ton Diening
Providing untested answers that tend to be
more complicated than others.
Reply with quote
karion
Newbie


Joined: 03 Jul 2002
Posts: 8
Location: Netherlands

PostPosted: Wed Jul 03, 2002 6:16 pm   
 
No this is also wrong...
Also Functions doesnt work...
I have entered "%abs(3.2)" , but this is sent to the mud
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Jul 03, 2002 6:21 pm   
 
Floating point operations aren't overly supported
in the general release of zMud. It probably
is cast to accept an integer only.

The lastest beta version is happier with
real values like 3.2

//

Ref: %lastinput

Perhaps you can let us know what you are
trying to do. Based on that, the help
provided could be more beneficial to you.

Ton Diening
Providing untested answers that tend to be
more complicated than others.
Reply with quote
karion
Newbie


Joined: 03 Jul 2002
Posts: 8
Location: Netherlands

PostPosted: Wed Jul 03, 2002 6:46 pm   
 
#show %char(34)--> "#"
but with me this expression is not evaluated.
"%char(34)" appears actual on the screen with me.
I use version 3.62
Special characters are correctly adjusted
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Jul 03, 2002 7:54 pm   
 
v3.62 is very old so my help may be most unhelpful.
Do realize that v3.62 is "unsupported"


#show [%char(34)]--> "#"

I don't even know if by puttig [] around
the %char function in v3.62 will evaluate it.


Ton Diening
Providing untested answers that tend to be
more complicated than others.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Wed Jul 03, 2002 9:06 pm   
 
Since 3.62 is so old, and almost no one in here uses it, why don't you try looking in the help file for a function that you know is supprted by 3.62 and then testing it in the command line to see if zMUD executes the function or just sends it as if it were normal text.

If zMUD does not execute the function, then perhaps you have turned off parsing somewhere or done something similar with another option.

Kjata
Reply with quote
karion
Newbie


Joined: 03 Jul 2002
Posts: 8
Location: Netherlands

PostPosted: Thu Jul 04, 2002 2:23 pm   
 
Menu Settings/Parse is on.
#show Test--> ok
#VA Test 3-->ok
(all with # is ok)
but all with % is not ok
zmud 3.62 helpfile says %char (example) is supported!
Menu Help/Function Wizard! says %char (example) is supported!
But all with "%" is sending to the mud.
My Zmud is a freshly downloaded version(3.62).
All attitudes are correct.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Jul 04, 2002 4:48 pm   
 
Hmmm, that's starnge. And you say that the % character used for functions has not been changed and/or disabled?

Kjata
Reply with quote
karion
Newbie


Joined: 03 Jul 2002
Posts: 8
Location: Netherlands

PostPosted: Thu Jul 04, 2002 8:08 pm   
 
The problem was that Funtionen are not supported on the command line
Solution "#ALIAS test {#SHOW %char(33)}" -->OK
#ALIAS test {#SHOW %lastcom)}-->OK
I wouldn't have thought of doing it like that!
Thanks for the help, you nearly got it right ;)

Bye
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