SA-MP Forums Archive
code error: - 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: code error: (/showthread.php?tid=426142)



code error: - Pedro Pawno - 28.03.2013

code:

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {

    new carro = GetPlayerVehicleID(playerid);
    for(new i = 0; i < sizeof(CarroA); i ++)
    if(carro == CarroA[i])
    if(Gang[playerid] != aztecas)
    RemovePlayerFromVehicle(playerid);

    for(new i = 0; i < sizeof(CarroG); i ++)
    if(carro == CarroG[i])
    if(Gang[playerid] != grove)
    RemovePlayerFromVehicle(playerid);

    for(new i = 0; i < sizeof(CarroV); i ++)
    if(carro == CarroV[i])
    if(Gang[playerid] != vagos)
    RemovePlayerFromVehicle(playerid);

    for(new i = 0; i < sizeof(CarroB); i ++)
    if(carro == CarroB[i])
    if(Gang[playerid] != ballas)
    RemovePlayerFromVehicle(playerid);
    }
    }
    return 1;
}
public ComandoKillTempo(playerid)
{
    GivePlayerMoney(playerid,2500);
    scm(playerid,Neutra,"Dinheiro roubado!");
    return 1;
}
error:

pawn Код:
C:\Users\camila\Desktop\Pastas\PAWN\gamemodes\Servidor.pwn(414) : warning 217: loose indentation
C:\Users\camila\Desktop\Pastas\PAWN\gamemodes\Servidor.pwn(414) : error 029: invalid expression, assumed zero
C:\Users\camila\Desktop\Pastas\PAWN\gamemodes\Servidor.pwn(414) : error 004: function "OnPlayerStateChange" is not implemented
C:\Users\camila\Desktop\Pastas\PAWN\gamemodes\Servidor.pwn(441) : warning 217: loose indentation
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.



Re: code error: - LeeXian99 - 28.03.2013

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {

    new carro = GetPlayerVehicleID(playerid);
    for(new i = 0; i < sizeof(CarroA); i ++)
    if(carro == CarroA[i])
    if(Gang[playerid] != aztecas)
    RemovePlayerFromVehicle(playerid);

    for(new i = 0; i < sizeof(CarroG); i ++)
    if(carro == CarroG[i])
    if(Gang[playerid] != grove)
    RemovePlayerFromVehicle(playerid);

    for(new i = 0; i < sizeof(CarroV); i ++)
    if(carro == CarroV[i])
    if(Gang[playerid] != vagos)
    RemovePlayerFromVehicle(playerid);

    for(new i = 0; i < sizeof(CarroB); i ++)
    if(carro == CarroB[i])
    if(Gang[playerid] != ballas)
    RemovePlayerFromVehicle(playerid);
    } //Only one flower bracket is needed
    return 1;
}