SA-MP Forums Archive
end error - 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: end error (/showthread.php?tid=399051)



end error - truckingserver - 12.12.2012

Код:
#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Job1");
	print("--------------------------------------\n");
	return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(vehicleid) == 418) //moonbeam
    {
        if(GetPlayerScore(playerid) < 50)
        {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid,0xAA3333AA,"You need 50 score to drive this car.");
        }
        SetTimerEx("wincash", 60000, true, "i", playerid);
    }
    return 1;
}
//Now outside any callback.
forward wincash(playerid);
public wincash(playerid)
{
    GivePlayerMoney(playerid, 20);
    return 1;
}
C:\Users\Mano\Desktop\Untitled.pwn(34) : error 001: expected token: "#endif", but found "-end of file-"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


Re: end error - Camorra - 12.12.2012

Код:
#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Job1");
	print("--------------------------------------\n");
	return 1;
}
#endif   // Missed

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(vehicleid) == 418) //moonbeam
    {
        if(GetPlayerScore(playerid) < 50)
        {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid,0xAA3333AA,"You need 50 score to drive this car.");
        }
        SetTimerEx("wincash", 60000, true, "i", playerid);
    }
    return 1;
}
//Now outside any callback.
forward wincash(playerid);
public wincash(playerid)
{
    GivePlayerMoney(playerid, 20);
    return 1;
}



Re: end error - David (Sabljak) - 12.12.2012

REMOVE - #if defined FILTERSCRIPT

And put #define FILTERSCRIPT


Re: end error - LarzI - 12.12.2012

Quote:
Originally Posted by David (Sabljak)
Посмотреть сообщение
REMOVE - #if defined FILTERSCRIPT

And put #define FILTERSCRIPT
What? No.

Either add
pawn Код:
#define FILTERSCRIPT
above the #if defined line, or just remove both lines; #if defined and #endif


Re: end error - truckingserver - 12.12.2012

Thanks you Guys : )