end error
#1

Код:
#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.
Reply
#2

Код:
#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;
}
Reply
#3

REMOVE - #if defined FILTERSCRIPT

And put #define FILTERSCRIPT
Reply
#4

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
Reply
#5

Thanks you Guys : )
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)