SA-MP Forums Archive
#endif", but found "-end of file-" - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: #endif", but found "-end of file-" (/showthread.php?tid=108820)



#endif", but found "-end of file-" - [HKS]dlegend - 16.11.2009

i have one eror not sure wat it means here is the end of my script
Код:
public CreateRaceMenus()
{
	//Admin menu
	MAdmin = CreateMenu("Admin menu", 1, 25, 170, 220, 25);
	AddMenuItem(MAdmin,0,"Set prizemode...");
	AddMenuItem(MAdmin,0,"Set fixed prize...");
	AddMenuItem(MAdmin,0,"Set dynamic prize...");
	AddMenuItem(MAdmin,0,"Set entry fees...");
	AddMenuItem(MAdmin,0,"Majority delay...");
	AddMenuItem(MAdmin,0,"End current race");
	AddMenuItem(MAdmin,0,"Toggle Race Admin [RA]");
	AddMenuItem(MAdmin,0,"Toggle Build Admin [BA]");
	AddMenuItem(MAdmin,0,"Toggle Race Rotation [RR]");
	AddMenuItem(MAdmin,0,"Leave");
	if(RaceAdmin == 1) format(ystring,sizeof(ystring),"RA: ON");
	else format(ystring,sizeof(ystring),"RA: off");
	if(BuildAdmin == 1) format(ystring,sizeof(ystring),"%s BA: ON",ystring);
	else format(ystring,sizeof(ystring),"%s BA: off",ystring);
	if(RRotation >= 0) format(ystring,sizeof(ystring),"%s RR: ON",ystring);
	else format(ystring,sizeof(ystring),"%s RR: off",ystring);
	SetMenuColumnHeader(MAdmin,0,ystring);
	//Prizemode menu [Admin submenu]
	MPMode = CreateMenu("Set prizemode:", 1, 25, 170, 220, 25);
	AddMenuItem(MPMode,0,"Fixed");
	AddMenuItem(MPMode,0,"Dynamic");
	AddMenuItem(MPMode,0,"Entry Fee");
	AddMenuItem(MPMode,0,"Entry Fee + Fixed");
	AddMenuItem(MPMode,0,"Entry Fee + Dynamic");
	AddMenuItem(MPMode,0,"Back");
	SetMenuColumnHeader(MPMode,0,"Mode: Fixed");
	//Fixed prize menu
	MPrize = CreateMenu("Fixed prize:", 1, 25, 170, 220, 25);
	AddMenuItem(MPrize,0,"+100$");
	AddMenuItem(MPrize,0,"+1000$");
	AddMenuItem(MPrize,0,"+10000$");
	AddMenuItem(MPrize,0,"-100$");
	AddMenuItem(MPrize,0,"-1000$");
	AddMenuItem(MPrize,0,"-10000$");
	AddMenuItem(MPrize,0,"Back");
	format(ystring,sizeof(ystring),"Amount: %d",Prize);
	SetMenuColumnHeader(MPrize,0,ystring);
	//Dynamic prize menu
	MDyna = CreateMenu("Dynamic Prize:", 1, 25, 170, 220, 25);
	AddMenuItem(MDyna,0,"+1x");
	AddMenuItem(MDyna,0,"+5x");
	AddMenuItem(MDyna,0,"-1x");
	AddMenuItem(MDyna,0,"-5x");
	AddMenuItem(MDyna,0,"Leave");
	format(ystring,sizeof(ystring),"Multiplier: %dx",DynaMP);
	SetMenuColumnHeader(MDyna,0,ystring);
	//Build Menu
	MBuild = CreateMenu("Build Menu", 1, 25, 170, 220, 25);
	AddMenuItem(MBuild,0,"Set laps...");
	AddMenuItem(MBuild,0,"Set racemode...");
	AddMenuItem(MBuild,0,"Checkpoint size...");
	AddMenuItem(MBuild,0,"Toggle air race");
	AddMenuItem(MBuild,0,"Clear the race and exit");
	AddMenuItem(MBuild,0,"Leave");
	SetMenuColumnHeader(MBuild,0,"Air race: off");
	//Laps menu
	MLaps = CreateMenu("Set laps", 1, 25, 170, 220, 25);
	AddMenuItem(MLaps,0,"+1");
	AddMenuItem(MLaps,0,"+5");
	AddMenuItem(MLaps,0,"+10");
	AddMenuItem(MLaps,0,"-1");
	AddMenuItem(MLaps,0,"-5");
	AddMenuItem(MLaps,0,"-10");
	AddMenuItem(MLaps,0,"Back");
	//Racemode menu
	MRacemode = CreateMenu("Racemode", 1, 25, 170, 220, 25);
	AddMenuItem(MRacemode,0,"Default");
	AddMenuItem(MRacemode,0,"Ring");
	AddMenuItem(MRacemode,0,"Yoyo");
	AddMenuItem(MRacemode,0,"Mirror");
	AddMenuItem(MRacemode,0,"Back");
	//Race menu
	MRace = CreateMenu("Race Menu", 1, 25, 170, 220, 25);
	AddMenuItem(MRace,0,"Set laps...");
	AddMenuItem(MRace,0,"Set racemode...");
	AddMenuItem(MRace,0,"Set checkpoint size...");
	AddMenuItem(MRace,0,"Toggle air race");
	AddMenuItem(MRace,0,"Start race");
	AddMenuItem(MRace,0,"Abort new race");
	//Entry fee menu
	MFee = CreateMenu("Entry fees", 1, 25, 170, 220, 25);
	AddMenuItem(MFee,0,"+100");
	AddMenuItem(MFee,0,"+1000");
	AddMenuItem(MFee,0,"+10000");
	AddMenuItem(MFee,0,"-100");
	AddMenuItem(MFee,0,"-1000");
	AddMenuItem(MFee,0,"-10000");
	AddMenuItem(MFee,0,"Back");
	format(ystring,sizeof(ystring),"Fee: %d$",JoinFee);
	SetMenuColumnHeader(MFee,0,ystring);
	//CP size menu
	MCPsize = CreateMenu("CP size", 1, 25, 170, 220, 25);
	AddMenuItem(MCPsize,0,"+0.1");
	AddMenuItem(MCPsize,0,"+1");
	AddMenuItem(MCPsize,0,"+10");
	AddMenuItem(MCPsize,0,"-0.1");
	AddMenuItem(MCPsize,0,"-1");
	AddMenuItem(MCPsize,0,"-10");
	AddMenuItem(MCPsize,0,"Back");
	//Majority Delay menu
	MDelay = CreateMenu("Majority Delay", 1, 25, 170, 220, 25);
	AddMenuItem(MDelay,0,"+10s");
	AddMenuItem(MDelay,0,"+60s");
	AddMenuItem(MDelay,0,"-10s");
	AddMenuItem(MDelay,0,"-60s");
	AddMenuItem(MDelay,0,"Back");
	if(MajorityDelay == 0) format(ystring,sizeof(ystring),"Delay: disabled");
	else format(ystring,sizeof(ystring),"Delay: %ds",MajorityDelay);
	SetMenuColumnHeader(MDelay,0,ystring);
}

#endif
(7376) : error 001: expected token: "#endif", but found "-end of file-"

thanks


Re: #endif", but found "-end of file-" - AKA_Cross - 16.11.2009

Um, Maybe Delete "#endif" ? Remove it and it should work Fine


Re: #endif", but found "-end of file-" - Abernethy - 16.11.2009

Place #endif at the bottom of your Filterscript.


Re: #endif", but found "-end of file-" - [HKS]dlegend - 16.11.2009

i have yet it still wants to be a bitch


Re: #endif", but found "-end of file-" - [Marevin*] - 16.11.2009

Maybe putting this in the top of your script would fix the problem:
Код:
#define FILTERSCRIPT



Re: #endif", but found "-end of file-" - LarzI - 16.11.2009

you need to add another #endif, it's selfexplained really


Re: #endif", but found "-end of file-" - [HKS]dlegend - 16.11.2009

that simple thanks man



Re: #endif", but found "-end of file-" - Niixie - 24.11.2009

Hello.
Its really easy.

If this is in the top of your script:

Код:
#if defined FILTERSCRIPT
You need this in your script also:

Код:
#endif
Heres the top of a new .pwn file

Код:
#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

#endif
You see if its a filterscript you can cut it down, and make it look like this:

Код:
#include <a_samp>

#define FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}
easy as hell


Re: #endif", but found "-end of file-" - yom - 24.11.2009

And why you need that #define FILTERSCRIPT if you never use it?


Re: #endif", but found "-end of file-" - jamesbond007 - 25.11.2009

C:\Users\Max\Desktop\Server\gamemodes\lsgangwar.pw n(131) : error 001: expected token: "{", but found ";"
C:\Users\Max\Desktop\Server\gamemodes\lsgangwar.pw n(133) : error 014: invalid statement; not in switch
C:\Users\Max\Desktop\Server\gamemodes\lsgangwar.pw n(133) : warning 215: expression has no effect
C:\Users\Max\Desktop\Server\gamemodes\lsgangwar.pw n(133) : error 001: expected token: ";", but found ":"
C:\Users\Max\Desktop\Server\gamemodes\lsgangwar.pw n(133) : error 029: invalid expression, assumed zero
C:\Users\Max\Desktop\Server\gamemodes\lsgangwar.pw n(133) : fatal error 107: too many error messages on one line

i did what you all said and got this?