SA-MP Forums Archive
[Ajuda] Error 030 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Error 030 (/showthread.php?tid=534086)



Error 030 - Patrick141 - 27.08.2014

Gostaria que alguem me ajudasse , codigo:
pawn Код:
erro : error 030: compound statement not closed at the end of file (started at line 3752)
Public : OnPlayerUpdate

pawn Код:
pupdates[playerid]++;
if(pupdates[playerid] > UPDATE_COUNT && running == 1)
{
pupdates[playerid]=0;
new check;
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && IsVehicleValid(GetPlayerVehicleID(playerid)))
{
new Float:vx,Float:vy,Float:vz;
GetVehicleVelocity(GetPlayerVehicleID(playerid),vx,vy,vz);
if(vx==0.0 && vy==0.0 && vz < -0.0032 && vz > -0.022)
{
if(IsPlayerInWater(playerid)==0)
{
check=1;
}
else
{
check=3;
}
}
}
else
{
if(GetPlayerState(playerid)==PLAYER_STATE_ONFOOT && GetPlayerSurfingVehicleID(playerid)==INVALID_VEHICLE_ID)
{
new Float:vx,Float:vy,Float:vz,Float:px,Float:py,Float:pz;
GetPlayerVelocity(playerid,vx,vy,vz);
pupdates[playerid]=0;
new keys,ud,lr;
GetPlayerKeys(playerid,keys,ud,lr);
if (keys & KEY_SPRINT)
{
if(-0.022 < vz < -0.0040 && -0.235 < vx < 0.235 && -0.235 < vy < 0.235)
{
if(!IsPlayerInRangeOfPoint(playerid,2.0,GetPVarFloat(playerid,"oposx"),GetPVarFloat(playerid,"oposy"),GetPVarFloat(playerid,"oposz")) || -0.5>(GetPVarFloat(playerid,"oposz")-pz)>-0.1 || 0.075>(GetPVarFloat(playerid,"oposz")-pz)>-0.075)
{
if(IsPlayerInWater(playerid)==0)
{
check=2;
if(airbreakcount[playerid] > (POSSIBLE_AIRBREAK_COUNT_ONFOOT-2))
{
SetPlayerVelocity(playerid,0.3,0.3,0.3);
}
}
else
{
check=3;
}
}
SetPVarFloat(playerid,"oposx",px);
SetPVarFloat(playerid,"oposy",py);
SetPVarFloat(playerid,"oposz",pz);
}
}
else
{
if(-0.022 < vz < -0.0040 && -0.121 < vx < 0.121 && -0.121 < vy < 0.121)
{
if(!IsPlayerInRangeOfPoint(playerid,2.0,GetPVarFloat(playerid,"oposx"),GetPVarFloat(playerid,"oposy"),GetPVarFloat(playerid,"oposz")) || -0.5>(GetPVarFloat(playerid,"oposz")-pz)>-0.1 || 0.075>(GetPVarFloat(playerid,"oposz")-pz)>-0.075)
{
if(IsPlayerInWater(playerid)==0)
{
check=2;
if(airbreakcount[playerid] > (POSSIBLE_AIRBREAK_COUNT_ONFOOT-2))
{
SetPlayerVelocity(playerid,0.3,0.3,0.3);
}
}
else
{
check=3;
}
}
SetPVarFloat(playerid,"oposx",px);
SetPVarFloat(playerid,"oposy",py);
SetPVarFloat(playerid,"oposz",pz);
}
}
}
}
if(check > 0)
{
if(check < 3)
{
new POSSIBLE_AIRBREAK_COUNT;
switch(check)
{
case 1: POSSIBLE_AIRBREAK_COUNT=POSSIBLE_AIRBREAK_COUNT_CAR;
case 2: POSSIBLE_AIRBREAK_COUNT=POSSIBLE_AIRBREAK_COUNT_ONFOOT;
}
airbreakcount[playerid]++;
if(airbreakcount[playerid] > POSSIBLE_AIRBREAK_COUNT)
{
airbreakcount[playerid]=0;
new ip[20],name[24];
GetPlayerName(playerid,name,sizeof(name));
GetPlayerIp(playerid,ip,sizeof(ip));
switch(check)
{
case 1:printf("Airbreak: %s(%s) foi banido. [motivo: Airbreak] !",name,ip);
case 2:printf("Airbreak: %s(%s) foi banido. [motivo: Airbreak] !",name,ip);
}
Ban(playerid);
}
}
}
else
{
airbreakcount[playerid]=0;
}
}
estou a colocar um anti-air break em minha gamemode, porem nao consigo compilar, so tem esse erro ae.
caso queira ver o codigo : https://sampforum.blast.hk/showthread.php?tid=142302


Respuesta: Error 030 - TorresPutado - 27.08.2014

Uma perguntinha esse codigo esta em que public??


Re: Respuesta: Error 030 - Patrick141 - 27.08.2014

Quote:
Originally Posted by TorresPutado
Посмотреть сообщение
Uma perguntinha esse codigo esta em que public??
A desculpa nгo informar, OnPlayerUpdate.


Re: Error 030 - Patrick141 - 29.08.2014

Up ! Alguem me ajuda