SA-MP Forums Archive
Format warning? - 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: Format warning? (/showthread.php?tid=193702)



[SOLVED] Format warning? - Flyfishes - 27.11.2010

Yah hallo guys.
I hate warnings so that's why I'm askin for help nauw.

// Warning is on the format line
Код:
new wstring[256];
format(wstring, sizeof(wstring), "[General:] Name: %s - Health: %.1f - Cash: $%d - Score: %d",PlayerName(targetid),GetPlayerHealth(targetid),GetPlayerMoneyEx(targetid),PlayerInfo[targetid][pScore]);
Код:
C:\Users\something.pwn(1134) : warning 202: number of arguments does not match definition



Re: Format warning? - Retardedwolf - 27.11.2010

Firstly, I don't recommend you using 256 string size.

Its the gPH(ealth) that is causing the problem.

GetPlayerHealth ( playerid, &Float:Health );


Re: Format warning? - Flyfishes - 27.11.2010

No, i'll shorten the stringsize down abit. It was just raised to to test if I got rid of the warning.
But thanks for your help. Problem solved!