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
AzCowboy
Adept


Joined: 09 Nov 2000
Posts: 222
Location: USA

PostPosted: Fri Aug 23, 2002 7:42 am   

Create button script
 
Ok, here's the script I have so far:

 #ALIAS strscript {#var tmpbtn 1;#TRIGGER {^~[%%s(%%d)~] (%*).} {#sub "";#math btnwidth %len( %%2)*5+%len( %%1)*5+40;#if (@btnwidth<150) {#var btnwidth 150};#EXEC %concat( "#BUTTON ", @tmpbtn, " {", %%1, " -- buy ", %%2, "} {buy ", @tmpbtn, ".} {} {} {} {} {} {Size} {", @btnwidth, "} {23} {} {} {} {} {} {} {} {_MapperRoom} {} {} {}");#add tmpbtn 1};list}


The problem I have can be demonstrated by this store output:

[Price ] Merchandise:
[ 10] a simple iron bolt.
[ 1] a long arrow of ash wood.
[ 6] a long, oak arrow.
[ 10] an iron shod arrow.
[ 25] a hard leather quiver.
[ 30] a bow of ash wood.
[ 35] an iron shod bow.
[ 500] a blue steel bolt.
[ 1300] a blue steel crossbow.

The long, oak arrow button shows up as:
6 -- buy a longoak arrow

Any ideas to fix this?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Fri Aug 23, 2002 11:01 am   
 
Enclose the %2 with quotes.
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