Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Bing, Yandex

Members: 0
Guests: 7
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
614
BenitoVirg
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Coding » setting prompt isn't working ...
Forum Rules | Mark all | Recent Posts

setting prompt isn't working right.
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jun 11, 2006, 5:59 pm
Go to the top of the page
Go to the bottom of the page

thedlw

GroupMembers
Posts10
JoinedJun 10, 2006

here's what i got.
sprintf(promptbuf, "&B<&WL:(&C%d&W) S:(&G%s&W) G:(&Y%s&W)&B>",
     ch->hit, num_punct(ch->pcdata->stamina), num_punct(ch->gold));

the problem is when its displayed
the values for S and G are the same. regardless of what i try.
<L:(500) S:(1,036) G:(1,036)>
even though gold is 500k
       
Post is unread #2 Jun 11, 2006, 6:03 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

You can't call num_punct twice in the same line of code. It uses a static variable to return the results. You'll need to break up that line into two statements to combine the buffer. One that does stamina, the other that does gold.
       
Post is unread #3 Jun 11, 2006, 6:09 pm
Go to the top of the page
Go to the bottom of the page

thedlw

GroupMembers
Posts10
JoinedJun 10, 2006

thats what i thought i was actually tring to fix that problem. but i can't make it work right.
       
Pages:<< prev 1 next >>