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
Virus
Wanderer


Joined: 29 Jun 2002
Posts: 69
Location: USA

PostPosted: Sat Jul 27, 2002 8:18 pm   

Functions
 
I read somewhere that you can create functions for zmud. I want to make a rjust and ljust function for zmud. Once I get the code in how do I make it global?

Richard Powell
Mux Alias: Virus
2796 Wizard Staff
64.89.10.1 port 2796
Rich@gigdev.com
Reply with quote
Virus
Wanderer


Joined: 29 Jun 2002
Posts: 69
Location: USA

PostPosted: Sat Jul 27, 2002 8:44 pm   
 
The code I want to use is similar to this.

I want the function to be ljust(<Text>,<Length>,<Fill>) just like the mux.

Heres the code, I think
%1%repeat(%if(%3,%3," "),%eval(%2-%len(%1)))

I would move the %1 to the end for rjust. Anyhow is there a program or some way to add that function?

Richard Powell
Mux Alias: Virus
2796 Wizard Staff
64.89.10.1 port 2796
Rich@gigdev.com
Reply with quote
Virus
Wanderer


Joined: 29 Jun 2002
Posts: 69
Location: USA

PostPosted: Sat Jul 27, 2002 9:00 pm   
 
Ok
#FU ljust {%1%repeat(%if(%3,%3," "),%eval(%2-%len(%1)))}

Figured it out

Richard Powell
Mux Alias: Virus
2796 Wizard Staff
64.89.10.1 port 2796
Rich@gigdev.com
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