mirror of
https://github.com/tbamud/tbamud.git
synced 2025-12-23 18:50:13 +01:00
fixed bug in do_score due to add_commas editing a global var
This commit is contained in:
parent
c16166a555
commit
d74b07d8f5
1 changed files with 5 additions and 2 deletions
|
|
@ -784,6 +784,7 @@ ACMD(do_score)
|
|||
char arg[MAX_INPUT_LENGTH];
|
||||
struct char_data *vict;
|
||||
struct time_info_data playing_time;
|
||||
char gold_str[50], exp_str[50];
|
||||
|
||||
if (IS_NPC(ch))
|
||||
return;
|
||||
|
|
@ -823,8 +824,10 @@ ACMD(do_score)
|
|||
send_to_char(ch, "Your armor class is %d/10, and your alignment is %d.\r\n",
|
||||
compute_armor_class(vict), GET_ALIGNMENT(vict));
|
||||
|
||||
send_to_char(ch, "You have %s exp, %s gold coins, and %d questpoints.\r\n",
|
||||
add_commas(GET_EXP(vict)), add_commas(GET_GOLD(vict)), GET_QUESTPOINTS(vict));
|
||||
strcpy(gold_str, add_commas(GET_GOLD(vict)));
|
||||
strcpy(exp_str, add_commas(GET_EXP(vict)));
|
||||
send_to_char(ch, "You have %s exp, %s gold coin%s, and %d questpoints.\r\n",
|
||||
exp_str, gold_str, (GET_GOLD(vict) == 1 ? "" : "s"), GET_QUESTPOINTS(vict));
|
||||
|
||||
if (GET_LEVEL(vict) < CONFIG_MAX_LEVEL)
|
||||
send_to_char(ch, "You need %d exp to reach your next level.\r\n",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue