Problem with stock and propery showing it
#1

So i use this stock to define vip status but when you do Stats output is wierd.Like some function is counting it instead of showing it. Any help would be great. Thanks


pawn Код:
stock VipType(playerid)
{
      new viprank[10];
      switch(PlayerInfo[playerid][pVIP])
      {
             case 0: { viprank = "None"; }
             case 1: { viprank = "Plantium"; }
             case 2: { viprank = "Gold"; }
             case 3: { viprank = "Silver"; }
             case 4: { viprank = "Bronze"; }
      }
      return viprank;
}
Reply
#2

instead of formatting the rank with "%d" or "%i", use the string specifier "%s". the char "N" equals 78, "P" equals 80 etc when printed as integer.
Reply
#3

^^

And your function can be improved slightly.

Don't use the code i posted here it crashed my compiler for some reason.
Reply
#4

Thank you both. Eh me being stupid i used %d and it was driving me nuts. Thank guys for help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)