error 076: syntax error in the expression, or invalid function call
#1

I'm getting the error on my /stats. Wonder what's happening.

Код:
CMD:stats(playerid,params[])
{
	new string[128];
 	format(string,sizeof(string),"[Ime i prezime: %i] [Spol: %i] [Dob: %i] [Novac: %i][PayDay: %i] [Respekti: %i] [Level: %i]",PlayerName,PlayerInfo[playerid][pSex],PlayerInfo[playerid][pAge],PlayerInfo[playerid][pCash],PlayerInfo[playerid][pPaytime],PlayerInfo[playerid][pRespekti],GetPlayerScore(playerid)); 
 	SendClientMessage(playerid,COLOR_LIGHTBLUE,string); //Ispisuje poruku u COLOR_LIGHTBLUE boji
 	return 1;
}
Reply
#2

PlayerName is supposed to be an array isn't it ?

But you use "%i" to call it. Use "%s" instead.
Reply
#3

Oh, right. How about the rest of them, because I still get the error?
Reply
#4

I guess you forgot to get the player name?
pawn Код:
CMD:stats(playerid,params[])
{
    new string[128], PlayerName[24];
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    format(string, sizeof(string), "[Ime i prezime: %s] [Spol: %i] [Dob: %i] [Novac: %i][PayDay: %i] [Respekti: %i] [Level: %i]",PlayerName,PlayerInfo[playerid][pSex],PlayerInfo[playerid][pAge],PlayerInfo[playerid][pCash],PlayerInfo[playerid][pPaytime],PlayerInfo[playerid][pRespekti],GetPlayerScore(playerid));
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    return 1;
}
Reply
#5

Oh, how silly of me. Thanks, I appreciate your time
Reply
#6

No problem.
Reply
#7

Btw. does anyone know how to change Gender: 0, to Gender: Male?

Since I have DEFINE MALE 0, DEFINE FEMALE 1 xD
Reply
#8

i use this to show name of gender
pawn Код:
new atext[20];
        if(PlayerInfo[targetid][pSex] == 1) { atext = "Male"; }
        else if(PlayerInfo[targetid][pSex] == 2) { atext = "Female"; }
this is under my public "showstats" and later in the public where it tells the gender i just do atext
Reply
#9

Thaanks!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)