Warning and eror on textdraw - 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)
+--- Thread: Warning and eror on textdraw (
/showthread.php?tid=503268)
Warning and eror on textdraw -
lukysnba - 28.03.2014
What eror and warning i get
Код:
C:\Users\Luko\Desktop\real-c modas\gamemodes\band7.pwn(32098) : error 035: argument type mismatch (argument 2)
C:\Users\Luko\Desktop\real-c modas\gamemodes\band7.pwn(32097) : warning 204: symbol is assigned a value that is never used: "plwwl"
Lines where i get EROR
Код:
plwwl = GetPlayerTWanted(i);
TextDrawSetString(ITARIMAS1[i], plwwl );
ALL THIS CODE
Код:
public InfoUpdate()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
new plwwl = GetPlayerTWanted(i);
plwwl = GetPlayerTWanted(i);
TextDrawSetString(ITARIMAS1[i], plwwl );
TextDrawShowForPlayer(i, ITARIMAS1[i]);
}
return 1;
}
Re: Warning and eror on textdraw -
Konstantinos - 28.03.2014
The second argument in TextDrawSetString must be a string so format it:
pawn Код:
public InfoUpdate()
{
new szInfo[32];
for(new i=0; i<MAX_PLAYERS; i++)
{
format(szInfo, sizeof (szInfo), "%i", GetPlayerTWanted(i));
TextDrawSetString(ITARIMAS1[i], szInfo );
TextDrawShowForPlayer(i, ITARIMAS1[i]);
}
return 1;
}
Re: Warning and eror on textdraw -
xPr0BaNx - 28.03.2014
For warning, write at top #pragma unused plwwl