pawn crash
#1

hello,

my problem is this

i made filterskript on my race, and i did all of it but i have crashed my compile run





this is my race so please can anyone help
Код:
#include <a_samp>
#include <MidoStream>

#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_WHITE 0xFFFFFFAA

enum E_PLAYER_INFO
{
  pAdmin,
};

new AdminInfo[MAX_PLAYERS][E_PLAYER_INFO];


new gate1;
new gate2;

enum E_PLAYER_INFO
{
  pAdmin,
};

new AdminInfo[MAX_PLAYERS][E_PLAYER_INFO];


#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" NRG Race By galeb
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{

    return 1;
}

#else


#endif

public OnGameModeInit()
{
//-------------------nrg--------------------------------
  AddStaticVehicleEx(522,-1987.7423,902.2488,45.2097,178.4822,0,0,900);
	AddStaticVehicleEx(522,-1983.1742,902.4966,45.2097,178.4822,0,0,900);
	AddStaticVehicleEx(522,-1978.3529,902.3719,45.2097,178.4822,0,0,900);
	AddStaticVehicleEx(522,-1974.3214,902.3315,45.2097,178.4822,0,0,900);
	AddStaticVehicleEx(522,-1971.3234,902.6776,45.2031,178.4822,0,0,900);
	AddStaticVehicleEx(522,-1971.9628,865.7813,45.2031,359.8687,0,0,900);
	AddStaticVehicleEx(522,-1971.9628,865.7813,45.2031,359.6716,0,0,900);
	AddStaticVehicleEx(522,-1976.4976,866.0451,45.2031,359.6716,0,0,900);
  AddStaticVehicleEx(522,-1983.2261,866.0992,45.2031,353.3213,0,0,900);
  AddStaticVehicleEx(522,-1986.3667,865.4835,45.2031,355.9951,0,0,900);
	CreateObject(972, -1972.061279, 890.428467, 44.200005, 0.0000, 0.0000, 0.0000);
  CreateObject(972, -1972.135864, 873.428467, 44.200005, 0.0000, 0.0000, 0.0000);
  CreateObject(972, -1981.157593, 907.769836, 44.200005, 0.0000, 0.0000, 270.6186);
  CreateObject(972, -1976.822388, 860.274963, 44.794777, 0.0000, 0.0000, 90.2409);
  CreateObject(993, -1991.241699, 867.704468, 47.186672, 0.0000, 0.0000, 90.2409);
  CreateObject(993, -1991.290527, 874.914551, 47.173553, 0.0000, 0.0000, 90.2409);
  CreateObject(993, -1991.369629, 899.373230, 47.261719, 0.0000, 0.0000, 90.2409);
  CreateObject(993, -1991.328979, 893.421692, 47.286720, 0.0000, 0.0000, 89.3814);
  gate1 = CreateObject(969, -1991.581177, 884.492920, 47.201939, 0.0000, 0.0000, 90.0000);
  gate2 = CreateObject(969, -1983.659912, 845.697510, 44.980431, 0.0000, 0.0000, 90.0000);
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
// --------------------------------NRG---------------------------------
	if (strcmp("/nrghelp", cmdtext, true, 10) == 0)
	{
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "__________________________________________________");
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "|~|~|Commands|~|~|");
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "/nrghelp - Ova komanda stvara ovo ;D.");
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "/clearchat - Ova komanda ocisti chat.");
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "/nrgs - Igraci startaju race.");
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "/nrgp - Dize se ogradiza za start.");
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "/nrg - Poziva igraca na startnu liniju.");
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "/nrgo - Otvara garazu sa NRG-ovima.");
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "/nrgz - Zatvara vrata sa NRG-ovima.");
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "__________________________________________________");
    return 1;
	}
	if(strcmp(cmdtext,"/clearchat",true)==0)
	{
		SendClientMessage(playerid,COLOR_WHITE," ");
		SendClientMessage(playerid,COLOR_WHITE," ");
		SendClientMessage(playerid,COLOR_WHITE," ");
		SendClientMessage(playerid,COLOR_WHITE," ");
		SendClientMessage(playerid,COLOR_WHITE," ");
		SendClientMessage(playerid,COLOR_WHITE," ");
		SendClientMessage(playerid,COLOR_WHITE," ");
		SendClientMessage(playerid,COLOR_WHITE," ");
		SendClientMessage(playerid,COLOR_WHITE," ");
		SendClientMessage(playerid,COLOR_WHITE," ");
		return 1;
	}
  if (strcmp(cmdtext, "/setnrg", true)==0)
	{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "KORISTITE: /setnrg [playerid/PartOfName]");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);

			if (PlayerInfo[playerid][pAdmin] >= 2)
			{
				if(IsPlayerConnected(giveplayerid))
				{
					SetPlayerCheckpoint(giveplayerid, -1990.8082,845.3881,45.6682,50.0);
					CP[giveplayerid] = 300;
					GetPlayerName(playerid, sendername, sizeof(sendername));
					GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					format(string, sizeof(string), " ORGANIZATOR %s je pozvao %s na NRG Race strat liniju!", sendername, giveplayer);
					SendClientMessageToAll(COLOR_LIGHTRED, string);
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD2, " Niste autorizirani za koristenje ove naredbe !");
			}
		}
		return 1;
	}
	if(strcmp(cmdtext,"/nrgs",true)==0)
	{
    MoveObject(gate2,-1983.595093, 845.671875, 42.480431,50.000);
		return 1;
	}
	if(strcmp(cmdtext,"/nrgp",true)==0)
	{
    MoveObject(gate2,-1983.659912, 845.697510, 44.980431,50.000);
		return 1;
	}
	if(strcmp(cmdtext,"/nrgo",true)==0)
	{
    MoveObject(gate1,-1991.512939, 884.430969, 40.476517,5);
		return 1;
	}
	if(strcmp(cmdtext,"/nrgz",true)==0)
	{
    MoveObject(gate1,-1991.581177, 884.492920, 47.201939,5);
		return 1;
	}
	if(strcmp(cmd, "/gotonrg", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			if(PlayerInfo[playerid][pAdmin] >= 3)
			{
				if (GetPlayerState(playerid) == 2)
				{
					new tmpcar = GetPlayerVehicleID(playerid);
					SetVehiclePos(tmpcar, -1990.8082,845.3881,45.6682);
					TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
				}
				else
				{
					SetPlayerPos(playerid, -1990.8082,845.3881,45.6682);
				}
				SendClientMessage(playerid, COLOR_GRAD1, "  Teleportiran si !");
				SetPlayerInterior(playerid,0);
				PlayerInfo[playerid][pInt] = 0;
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, " Nisi autoriziran za koristenje te komande!");
			}
		}
		return 1;
	}


public OnPlayerEnterCheckpoint(playerid)
{
//-----------------------------------NRG--------------------------------------------
	else if(CP[playerid] == 300) { CP[playerid] = 301; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, -1854.2563,846.4569,35.0569, 10.0); }
	else if(CP[playerid] == 301) { CP[playerid] = 302; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, -1673.5345,846.2385,24.6948, 10.0); }
	else if(CP[playerid] == 302) { CP[playerid] = 303; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, -1560.8887,844.1173,7.0391, 10.0); }
	else if(CP[playerid] == 303) { CP[playerid] = 304; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, -1526.5807,884.1758,7.0391, 10.0); }
	else if(CP[playerid] == 304) { CP[playerid] = 305; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, -1617.6240,925.2701,7.6576, 10.0); }
	else if(CP[playerid] == 305) { CP[playerid] = 306; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, -1808.1826,926.7799,24.7422, 10.0); }
	else if(CP[playerid] == 306) { CP[playerid] = 307; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, -1981.3612,926.8416,45.6645, 10.0); }
	else if(CP[playerid] == 307) { CP[playerid] = 308; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, -2001.6895,886.9785,45.2969, 10.0); }
  else if(CP[playerid] == 308)
	{
	  CP[playerid] = 0;
	  DisablePlayerCheckpoint(playerid);
	  GetPlayerName(playerid, name, sizeof(name));
		format(string, sizeof(string), "Organizator : %s je upravo zavrsio Utrku. ", name);
		SendClientMessageToAll(COLOR_LIGHTRED, string);
	  }

  	return 1;
	}
please help
Reply
#2

Check your code, you're probably missing a bracket.
Reply
#3

Quote:
Originally Posted by Don Correlli
Check your code, you're probably missing a bracket.
yes i checked and i look to a nother race from this forum samo
Reply
#4

You're missing a bracket at the end of the OnPlayerCommandText-callback.

pawn Код:
return 0;
}
Reply
#5

Quote:
Originally Posted by Don Correlli
You're missing a bracket at the end of the OnPlayerCommandText-callback.

pawn Код:
return 0;
}
still the same
Reply
#6

His right, just return 0; in the end
Reply
#7

enum E_PLAYER_INFO
{
pAdmin,
};


should be


enum E_PLAYER_INFO
{
pAdmin
};


Plus you have two of them.
Reply
#8

Quote:
Originally Posted by Mikep.
enum E_PLAYER_INFO
{
pAdmin,
};


should be


enum E_PLAYER_INFO
{
pAdmin
};
It doesn't matter, try to compile it and you'll see that it won't give the error with ,
Reply
#9

The last line in an enum doesn't have a comma.
Reply
#10

Quote:
Originally Posted by Don Correlli
It doesn't matter, try to compile it and you'll see that it won't give the error with ,
It works normally with comma like without it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)