[Ajuda] Ajuda erro ao compilar
#1

Quote:

public ScorenPing(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new string[256];
format(string,sizeof(string),"Deaths: ~w~%d ~G~Kills: ~w~%d ~g~Score: ~w~%d ~w~~g~Ping: ~w~%d ~w~~g~FPS: ~w~%d",GetPlayerScore(playerid),GetPlayerPing(play erid),GetPlayerFPS(playerid) pInfo[playerid][pDeaths], pInfo[playerid][pKills]);
TextDrawSetString(scoreandping[i], string);
}
}
}

Os erros:

Quote:

C:\Users\User\Downloads\San Andreas Multiplayer\gamemodes\GM.pwn(667) : error 001: expected token: ",", but found "-identifier-"
C:\Users\User\Downloads\San Andreas Multiplayer\gamemodes\GM.pwn(667) : warning 215: expression has no effect
C:\Users\User\Downloads\San Andreas Multiplayer\gamemodes\GM.pwn(667) : warning 215: expression has no effect
C:\Users\User\Downloads\San Andreas Multiplayer\gamemodes\GM.pwn(667) : error 001: expected token: ";", but found ")"
C:\Users\User\Downloads\San Andreas Multiplayer\gamemodes\GM.pwn(667) : error 029: invalid expression, assumed zero
C:\Users\User\Downloads\San Andreas Multiplayer\gamemodes\GM.pwn(667) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Linha do erro:

Quote:

format(string,sizeof(string),"Deaths: ~w~%d ~G~Kills: ~w~%d ~g~Score: ~w~%d ~w~~g~Ping: ~w~%d ~w~~g~FPS: ~w~%d",GetPlayerScore(playerid),GetPlayerPing(play erid),GetPlayerFPS(playerid) pInfo[playerid][pDeaths], pInfo[playerid][pKills]);

Reply
#2

Tente desta maneira.
PHP код:
public ScorenPing(playerid)
{
    for(new 
0MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
        new 
string[256];
        
format(string,sizeof(string),"Deaths: ~w~%d ~G~Kills: ~w~%d ~g~Score: ~w~%d ~w~~g~Ping: ~w~%d ~w~~g~FPS: ~w~%d",GetPlayerScore(playerid),GetPlayerPing(playerid),GetPlayerFPS(playerid), pInfo[playerid][pDeaths], pInfo[playerid][pKills]);
        
TextDrawSetString(scoreandping[i], string);
        }
    }

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)