Error autofix vehicle
#1

Код:
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(1105) : error 001: expected token: ";", but found "return"
pawn Код:
return 1;
That's the line

This is the whole code
pawn Код:
new fixtimer[MAX_PLAYERS],bool:actived[MAX_PLAYERS];
CMD:autofix(playerid)
{
    if(actived[playerid]) return SendClientMessage(playerid,-1,"disabled"),KillTimer(fixtimer[playerid]),actived[playerid] = false;
    fixtimer[playerid] = SetTimerEx("fixt",1000,true,"i",playerid);
    actived[playerid] = true;
    SendClientMessage(playerid,-1,"actived")
    return 1;
}
forward fixt(playerid);
public fixt(playerid)
{
    if(!IsPlayerInAnyVehicle(playerid)) return 0;
    RepairVehicle(GetPlayerVehicleID(playerid));
    return 1;
}
Reply
#2

pawn Код:
new fixtimer[MAX_PLAYERS],bool:actived[MAX_PLAYERS];
CMD:autofix(playerid)
{
    if(actived[playerid]) return SendClientMessage(playerid,-1,"disabled"),KillTimer(fixtimer[playerid]),actived[playerid] = false;
    fixtimer[playerid] = SetTimerEx("fixt",1000,true,"i",playerid);
    actived[playerid] = true;
    SendClientMessage(playerid,-1,"actived");
    return 1;
}
forward fixt(playerid);
public fixt(playerid)
{
    if(!IsPlayerInAnyVehicle(playerid)) return 0;
    RepairVehicle(GetPlayerVehicleID(playerid));
    return 1;
}
Reply
#3

When I changed the code to this

Код:
new fixtimer[MAX_PLAYERS],bool:actived[MAX_PLAYERS];
CMD:autofix(playerid)
{
    if(actived[playerid]) return SendClientMessage(playerid,-1,"disabled"),KillTimer(fixtimer[playerid]),actived[playerid] = false;
    fixtimer[playerid] = SetTimerEx("fixt",1000,true,"i",playerid);
    actived[playerid] = true;
    SendClientMessage(playerid,-1,"actived")
    
forward fixt(playerid)
public fixt(playerid)
{
    if(!IsPlayerInAnyVehicle(playerid)) return 0;
    RepairVehicle(GetPlayerVehicleID(playerid));
    return 1;
}
I got this erros
Код:
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(1106) : error 001: expected token: ";", but found "forward"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(1106) : error 029: invalid expression, assumed zero
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(1106) : error 017: undefined symbol "fixt"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\gamemodes\grandlarc3.pwn(1106) : fatal error 107: too many error messages on one line
Reply
#4

pawn Код:
new fixtimer[MAX_PLAYERS],bool:actived[MAX_PLAYERS];
CMD:autofix(playerid)
{
    if(actived[playerid]) return SendClientMessage(playerid,-1,"disabled"),KillTimer(fixtimer[playerid]),actived[playerid] = false;
    fixtimer[playerid] = SetTimerEx("fixt",1000,true,"i",playerid);
    actived[playerid] = true;
    SendClientMessage(playerid,-1,"actived");
    return 1;
}
   
forward fixt(playerid)
public fixt(playerid)
{
    if(!IsPlayerInAnyVehicle(playerid)) return 0;
    RepairVehicle(GetPlayerVehicleID(playerid));
    return 1;
}
Use this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)