What Wrong Here why error?
#1

Hey
Код:
F:\test.pwn(7) : warning 217: loose indentation
F:\test.pwn(14) : error 030: compound statement not closed at the end of file (started at line 6)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Код:
#include <a_samp>
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "You are not in a vehicle!");
    if(GetPlayerState(playerid) != 2) return SendClientMessage(playerid, -1, "You are not in the driver seat!");
    RepairVehicle(GetPlayerVehicleID(playerid));
    SendClientMessage(playerid, -1, "Your vehicle has been sucessfully repaired(fixed)!");
    PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
    if(GetPlayerState(playerid) != 2) return SendClientMessage(playerid, -1, "You are not in the driver seat!");
    RepairVehicle(GetPlayerVehicleID(playerid));
    return 1;
Reply
#2

Did you close the function? It says it started at line 6, which is the opening bracket, so make a closing bracket after return 1
Reply
#3

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "You are not in a vehicle!");
    if(GetPlayerState(playerid) != 2) return SendClientMessage(playerid, -1, "You are not in the driver seat!");
    RepairVehicle(GetPlayerVehicleID(playerid));
    SendClientMessage(playerid, -1, "Your vehicle has been sucessfully repaired(fixed)!");
    PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
    if(GetPlayerState(playerid) != 2) return SendClientMessage(playerid, -1, "You are not in the driver seat!");
    RepairVehicle(GetPlayerVehicleID(playerid));
    return 1;
}//forgot that bracket!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)