SA-MP Forums Archive
Calculating percents - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Calculating percents (/showthread.php?tid=111214)



Calculating percents - armyoftwo - 30.11.2009

Код:
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!



Re: Calculating percents - woot - 30.11.2009

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



Re: Calculating percents - MPKaboose - 30.11.2009

you missed a " ; " at the end of the line


Re: Calculating percents - armyoftwo - 30.11.2009

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


Re: Calculating percents - Streetplaya - 30.11.2009

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