String error or something?
#1

Hello,

I've made this script, that echos what a players plate number is, the number is saved in their user file under pPlate or Plate. But when I do the command it is supposed to say 'Your plate number is 123456. Type /changeplate [8 chars] to change it." Instead it says "Your plate number is @. Type /changeplate [8 chars] to change it." I'm not sure if I should replace %s with something or what, help!

Code
pawn Код:
if(strcmp(cmd, "/plate", true) == 0)
    {
    new string[128];
    format(string, sizeof(string), "Your plate number is %s. Type /changeplate [8 chars] to change it.", PlayerInfo[playerid][pPlate]);
    SendClientMessage(playerid, COLOR_SYSTEM, string);
    return 1;
}
Reply
#2

pawn Код:
if(strcmp(cmd, "/plate", true) == 0)
    {
    new string[128];
    format(string, sizeof(string), "Your plate number is %d. Type /changeplate [8 chars] to change it.", PlayerInfo[playerid][pPlate]);
    SendClientMessage(playerid, COLOR_SYSTEM, string);
    return 1;
}
Try that.
Changed %s to %d
Reply
#3

Can I have the /changeplate ? .
Reply
#4

Works Drebin, thanks.

Darnell: I haven't coded that part yet, sorry. When I do I'll send you a PM though.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)