[Ajuda] error 001: expected token: ";", but found "if"
#1

Estou tentando criar um sistema para o portao abrir com a letra H mas da esse erro
Quote:

error 001: expected token: ";", but found "if"

Codigos:
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
        new params[128]
		if((newkeys == KEY_HORN) && (IsPlayerInAnyVehicle(playerid)))
		{
			if(PortaoBuzina[playerid] == 0)
			{
				new id,file[150];
				PortaoBuzina[playerid] = 1;
				format(file, sizeof(file), P_GATES, id);
				if(DOF2_FileExists(file))
				{
					if(!IsPlayerInRangeOfPoint(playerid, 50.0, DOF2_GetInt(file, "fCordX"), DOF2_GetInt(file, "fCordY"), DOF2_GetInt(file, "fCordZ")))
					{
                        if(CallRemoteFunction("GetPlayerAdminLevel", "u", playerid) || GateInfo[strval(params)][SDono] != 3)
						{
                            MoveDynamicObject(DOF2_GetInt(file, "Id2"), DOF2_GetFloat(file, "aPosX"), DOF2_GetFloat(file, "aPosY"), DOF2_GetFloat(file, "aPosZ"), DOF2_GetInt(file, "Speed"));
						}
					}
				}
			}
			else if(PortaoBuzina[playerid] == 1)
			{
				new id,file[150];
				PortaoBuzina[playerid] = 0;
				format(file, sizeof(file), P_GATES, id);
				if(DOF2_FileExists(file))
				{
					if(!IsPlayerInRangeOfPoint(playerid, 50.0, DOF2_GetInt(file, "fCordX"), DOF2_GetInt(file, "fCordY"), DOF2_GetInt(file, "fCordZ")))
					{
						if(CallRemoteFunction("GetPlayerAdminLevel", "u", playerid) || GateInfo[strval(params)][SDono] != 3)
						{
                            MoveDynamicObject(DOF2_GetInt(file, "Id2"), DOF2_GetFloat(file, "fPosX"), DOF2_GetFloat(file, "fPosY"), DOF2_GetFloat(file, "fPosZ"), DOF2_GetInt(file, "Speed"));
						}
					}
				}
			}
		}
		return 1;


}
Reply
#2

Quote:

if(PortaoBuzina[playerid] == 0)

Linha do Erro
Reply
#3

@Edit nгo precisa Rodrigo resolveu para vocк.
Reply
#4

PHP код:
new params[128
Substitua por:
PHP код:
new params[128]; 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)