I'v been posting up a storm as of late, hope you guys can help me with this one too. My mud works on sublevels in a way and as a convience I tried to add a quick little gauge to let the players know how in a roundabout way close they are to the next sublevel. But it doesnt seem to be working?
The way I have it laid out is somthing like:
void do_stat( CHAR_DATA *ch, char *argument )
{
char buf[MAX_STRING_LENGTH];
if (ch->level >= 2)
sprintf(buf, "20 to ");
else if (ch->level >= 4)
sprintf(buf, "40 to ");
else if (ch->level >= 6)
sprintf(buf, "60 to ");
else if (ch->level >= 8)
sprintf(buf, "80 to ");
else if (ch->level >= 10)
sprintf(buf, "0 to ");
else if (ch->level >= 12)
sprintf(buf, "20 to ");
else if (ch->level >= 14)
sprintf(buf, "40 to ");
else if (ch->level >= 16)
sprintf(buf, "60 to ");
else if (ch->level >= 18)
sprintf(buf, "80 to ");
else if (ch->level >= 20)
sprintf(buf, "0 to ");
And it continues on like that then I somthing like this at the very bottom.
pager_printf(ch, "Precent to better Build: %s \n\r", buf );
Kind of slopy I know but I figured it would do the job for now, but it doesnt seem to be working? The "# to whatever level never changes". I guess it's another one of those things that when someone points me in the right directions it'll make me a much better coder heh. But till then it puzzles me as to why it's not working seems simple enough.
Thanks
The way I have it laid out is somthing like:
void do_stat( CHAR_DATA *ch, char *argument )
{
char buf[MAX_STRING_LENGTH];
if (ch->level >= 2)
sprintf(buf, "20 to ");
else if (ch->level >= 4)
sprintf(buf, "40 to ");
else if (ch->level >= 6)
sprintf(buf, "60 to ");
else if (ch->level >= 8)
sprintf(buf, "80 to ");
else if (ch->level >= 10)
sprintf(buf, "0 to ");
else if (ch->level >= 12)
sprintf(buf, "20 to ");
else if (ch->level >= 14)
sprintf(buf, "40 to ");
else if (ch->level >= 16)
sprintf(buf, "60 to ");
else if (ch->level >= 18)
sprintf(buf, "80 to ");
else if (ch->level >= 20)
sprintf(buf, "0 to ");
And it continues on like that then I somthing like this at the very bottom.
pager_printf(ch, "Precent to better Build: %s \n\r", buf );
Kind of slopy I know but I figured it would do the job for now, but it doesnt seem to be working? The "# to whatever level never changes". I guess it's another one of those things that when someone points me in the right directions it'll make me a much better coder heh. But till then it puzzles me as to why it's not working seems simple enough.
Thanks