Calculating percents
#1

Код:
new playerscore[MAX_PLAYERS];
playerscore(playerid) = GetPlayerScore(playerid) // error line
new str3[128];
format(str3, 128, "Rank Progress:%%", (Float:playerscore[playerid] * Float:RankInfo[PR][RRequirement]/100));
SendClientMessage(playerid,COLOR_RED, str3);
Код:
C:\Documents and Settings\ED\My Documents\[UF]SF-TDM.pwn(1288) : error 012: invalid function call, not a valid address
C:\Documents and Settings\ED\My Documents\[UF]SF-TDM.pwn(1288) : warning 215: expression has no effect
C:\Documents and Settings\ED\My Documents\[UF]SF-TDM.pwn(1288) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\ED\My Documents\[UF]SF-TDM.pwn(1288) : error 029: invalid expression, assumed zero
C:\Documents and Settings\ED\My Documents\[UF]SF-TDM.pwn(1288) : fatal error 107: too many error messages on one line
Can someone help me?

Note i have commented the line wheres the error!
Reply
#2

pawn Код:
playerscore[playerid] = GetPlayerScore(playerid); // () = [] & missing ;
Reply
#3

you missed a " ; " at the end of the line
Reply
#4

Okay thanks but when i go ingame it shows:
Rank Progressnothing)
Reply
#5

I guess youll have to use
Код:
"Your rank %d\%"
notice the \ for escaping
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)