Error autofix vehicle - 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: Error autofix vehicle (
/showthread.php?tid=381319)
Error autofix vehicle -
JEkvall95 - 29.09.2012
Код:
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"
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;
}
Re: Error autofix vehicle -
RedJohn - 29.09.2012
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;
}
Re: Error autofix vehicle -
JEkvall95 - 29.09.2012
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
Re: Error autofix vehicle -
RedJohn - 29.09.2012
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.