Warning and eror on textdraw
#1

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;
}
Reply
#2

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;
}
Reply
#3

For warning, write at top #pragma unused plwwl
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)