Compile error 030
#1

Please help. I can't compile my script if this error is not fix, and that is Error: 030
These are the Errors
Quote:

C:\Users\4neals\Desktop\Samp\Main\gamemodes\FreeRo am.pwn(125) : warning 217: loose indentation
C:\Users\4neals\Desktop\Samp\Main\gamemodes\FreeRo am.pwn(203) : warning 217: loose indentation
C:\Users\4neals\Desktop\Samp\Main\gamemodes\FreeRo am.pwn(22 : warning 217: loose indentation
C:\Users\4neals\Desktop\Samp\Main\gamemodes\FreeRo am.pwn(230) : warning 217: loose indentation
C:\Users\4neals\Desktop\Samp\Main\gamemodes\FreeRo am.pwn(244) : error 030: compound statement not closed at the end of file (started at line 222)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

This is my full code
Quote:

// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#include <YSI\y_ini>
native WP_Hash(buffer[], len, const str[]);

#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_RED 0xAA3333AA
#define COLOR_LIME 0x10F441AA
#define COLOR_MAGENTA 0xFF00FFFF
#define COLOR_NAVY 0x000080AA
#define COLOR_AQUA 0xF0F8FFAA
#define COLOR_CRIMSON 0xDC143CAA
#define COLOR_FLBLUE 0x6495EDAA
#define COLOR_BISQUE 0xFFE4C4AA
#define COLOR_BLACK 0x000000AA
#define COLOR_CHARTREUSE 0x7FFF00AA
#define COLOR_BROWN 0XA52A2AAA
#define COLOR_CORAL 0xFF7F50AA
#define COLOR_GOLD 0xB8860BAA
#define COLOR_GREENYELLOW 0xADFF2FAA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_IVORY 0xFFFF82AA
#define COLOR_LAWNGREEN 0x7CFC00AA
#define COLOR_SEAGREEN 0x20B2AAAA
#define COLOR_LIMEGREEN 0x32CD32AA //<--- Dark lime
#define COLOR_MIDNIGHTBLUE 0X191970AA
#define COLOR_MAROON 0x800000AA
#define COLOR_OLIVE 0x808000AA
#define COLOR_ORANGERED 0xFF4500AA
#define COLOR_PINK 0xFFC0CBAA // - Light light pink
#define COLOR_SPRINGGREEN 0x00FF7FAA
#define COLOR_TOMATO 0xFF6347AA // - Tomato >:/ sounds wrong lol... well... :P
#define COLOR_YELLOWGREEN 0x9ACD32AA //- like military green
#define COLOR_MEDIUMAQUA 0x83BFBFAA
#define COLOR_MEDIUMMAGENTA 0x8B008BAA // dark magenta ^^
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREY 0xAFAFAFAA


//------Actors------------//
new ActorBusinessman;

//----------Job New------------//
new BankDeliveryJob[256];

main()
{
print("\n----------------------------------");
print(" Future RolePlay Server - NealP");
print("----------------------------------\n");
}



public OnGameModeInit()
{
ActorBusinessman = CreateActor(76, 1431.0660,-961.1475,36.3253, 1431.0660); //Actor
AddStaticVehicle(459,1250.6285,-1834.1301,13.4423,1.4745,51,51); //BankDelivery1
AddStaticVehicle(459,1249.4926,-1811.6958,13.4739,185.6842,51,51); //BankDelivery2
AddStaticVehicle(459,1280.0493,-1833.0886,13.4418,90.2655,51,51); //BankDelivery3
AddStaticVehicle(459,1280.4384,-1821.6753,13.4100,92.3024,51,51); //BankDelivery4
AddStaticVehicle(459,1280.5349,-1811.7463,13.4370,89.3390,51,51); //BankDelivery5
AddStaticVehicle(459,1279.1827,-1801.5844,13.4368,84.7064,51,51); //BankDelivery6
SetGameModeText("Welcome to the Future FreeRoam");
ManualVehicleEngineAndLights();
DisableInteriorEnterExits();
return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}

public OnPlayerConnect(playerid)
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s has joined the server. Welcome!",pName);
SendClientMessageToAll(0xFFFFFFAA,string);

GameTextForPlayer(playerid,"~w~The Future Freeroam",3000,4);
SendClientMessage(playerid,COLOR_WHITE, "Welcome to The {FF0000}F{FFFFFF}uture {00FF00}R{FFFFFF}ole{0080FF}P{FFFFFF}lay");
return 1;
}

public OnPlayerSpawn(playerid)
{
SetPlayerColor(playerid,COLOR_WHITE);
GivePlayerMoney(playerid, 1000);
GivePlayerWeapon(playerid, WEAPON_COLT45,100);
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}


public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/findbankdelivery", cmdtext, true, 0) == 0)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 459)
{
BankDeliveryJob[playerid] = 1;
SetPlayerCheckpoint(playerid,1431.0660,-961.1475,36.3253,123);
SendClientMessage(playerid, COLOR_YELLOW, "* You have been given the coordinates to the area to get the delivery.");
return 1;
}
SendClientMessage(playerid, COLOR_RED,"You have to be in a bank delivery vehicle to do this!");
}
if (strcmp("/kill", cmdtext, true, 10) == 0)
{
if (IsPlayerAdmin(playerid))
SendClientMessage(playerid,COLOR_RED,"You commited suicide.");
SetPlayerHealth(playerid,0);
return 1;
}
if (strcmp("/adminhelp", cmdtext, true, 10) == 0)
{
if (IsPlayerAdmin(playerid))
SendClientMessage(playerid,COLOR_YELLOW,"/adminstarter /skinchange /specplayer /specvehicle /specoff /chouse /cbusiness /cpolice /cbank /view /return /vspawner");
return 1;
}
if (strcmp("/help", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_YELLOW,"/animlist /engine /lock /me /do /b /megaphone /low /ooc /toogleooc /whisper");
return 1;
}
if (strcmp("/adminstarter", cmdtext, true, 10) == 0)
{
if (IsPlayerAdmin(playerid))
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GivePlayerWeapon(playerid,WEAPON_MINIGUN,999999);
GivePlayerWeapon(playerid,WEAPON_M4,999999);
GivePlayerWeapon(playerid,WEAPON_DEAGLE,999999);
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USE JETPACK);
return 1;
}
if (strcmp("/engine", cmdtext, true, 10) == 0)//your command.
{
new vehicleid = GetPlayerVehicleID(playerid);//defining vehicleid is = to GetPlayerVehicleID.
new engine, lights, alarm, doors, bonnet, boot, objective;//these are the defines of the thing used in the command.
if(IsPlayerInAnyVehicle(playerid))//This will check that if a player is in the vehicle or not.
{
if(GetPlayerVehicleSeat(playerid) == 0) //Now this will check that if a player is on the driving seat or not.
{
GetVehicleParamsEx(vehicleid,engine,lights,alarm,d oors,bonnet,boot,objective);//will check that what is the state of the engine.
if(engine == 1)//will check that if the wngine in on or not.
{
GetVehicleParamsEx(vehicleid,engine,lights,alarm,d oors,bonnet,boot,objective);//this will check that what is the state of engine.That is is on or off.We can use it for multiple things like doors,alarms etc.But In this case I am using this for the engine only.
SetVehicleParamsEx(vehicleid,false,lights,alarm,do ors,bonnet,boot,objective);//when we change the engine and replace it with false,this will turn the vehicle engine off.Same if we make if true,this will make the engine on.
GameTextForPlayer(playerid,"Vehicle Engine Stopped!",2000,6);//for a text to appar on the screen for only 2 seconds.
return 1;
}
else
SetVehicleParamsEx(vehicleid,true,lights,alarm,doo rs,bonnet,boot,objective);//if vehicle engine is false it will change it to true.
GameTextForPlayer(playerid,"Vehicle Engine Started!",2000,6);//for a text to appar on the screen for only 2 seconds.
}
else SendClientMessage(playerid,-1,"Error: You are not at the driving seat!");//this is an error message,that if a player is not on the driving seat,this error message would appear.
return 1;
}
else
SendClientMessage(playerid,-1,"Error: You are not in a vehicle!");//this is the error message,that if a player is not in the car,the error message would apper.
}
if (strcmp("/lock", cmdtext, true, 10) == 0)//your command.
{
new engine, lights, alarm, doors, bonnet, boot, objective;
new vehicleid = GetPlayerVehicleID(playerid);//defining vehicleid is = to GetPlayerVehicleID.
if(IsPlayerInAnyVehicle(playerid))//Thsi will check that is a player In a vehcile or not.
{
GetVehicleParamsEx(vehicleid,engine,lights,alarm,d oors,bonnet,boot,objective);//will check that what is the state of the vehicle lock.
if(doors == 1)//will check if the doors are already loocked it not.
{
GetVehicleParamsEx(vehicleid,engine,lights,alarm,d oors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,engine,lights,alarm,f alse,bonnet,boot,objective);//same as the engine one.
GameTextForPlayer(playerid,"Vehicle Unlocked!",2000,6);//for a text to appar on the screen for only 2 seconds.
return 1;
}
else
SetVehicleParamsEx(vehicleid,engine,lights,alarm,t rue,bonnet,boot,objective);
GameTextForPlayer(playerid,"Vehicle Locked!",2000,6);//for a text to appar on the screen for only 2 seconds.
}
else
SendClientMessage(playerid,-1,"Error: You are not in a vehicle!");//the error message.
}
return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
if(BankDeliveryJob[playerid] > 0)
{
BankDeliveryJob[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
}

public OnPlayerEnterCheckpoint(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 459)
{
if(BankDeliveryJob[playerid] == 1){
BankDeliveryJob[playerid] = 2;
SetPlayerCheckpoint(playerid,1431.0660,-961.1475,36.3253,123);
SendClientMessage(playerid,COLOR_YELLOW,"Deliver them to the backdoor of the Los Santos bank.");
return 1;
}
if(BankDeliveryJob[playerid] == 2){
BankDeliveryJob[playerid] = 3;
SetPlayerCheckpoint(playerid,1212.9279,-1815.9828,16.5938,79);
return 1;
}
if(BankDeliveryJob[playerid] == 3){
BankDeliveryJob[playerid] = 0;
SendClientMessage(playerid, 0xFFFF00AA, "*Bank Manager: You have delivered our money! Here is a $500 as a reward!");
SendClientMessage(playerid, 0xFFFF00AA, "Congratulations. You have completed your Bank Delivery route. You have received 500$");
GivePlayerMoney(playerid, 500);
DisablePlayerCheckpoint(playerid);
return 1;
}
}

Please help.
Reply
#2

Show us the lines between 235-250.
Reply
#3

Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#include <YSI\y_ini>
native WP_Hash(buffer[], len, const str[]);

#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_RED 0xAA3333AA
#define COLOR_LIME 0x10F441AA
#define COLOR_MAGENTA 0xFF00FFFF
#define COLOR_NAVY 0x000080AA
#define COLOR_AQUA 0xF0F8FFAA
#define COLOR_CRIMSON 0xDC143CAA
#define COLOR_FLBLUE 0x6495EDAA
#define COLOR_BISQUE 0xFFE4C4AA
#define COLOR_BLACK 0x000000AA
#define COLOR_CHARTREUSE 0x7FFF00AA
#define COLOR_BROWN 0XA52A2AAA
#define COLOR_CORAL 0xFF7F50AA
#define COLOR_GOLD 0xB8860BAA
#define COLOR_GREENYELLOW 0xADFF2FAA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_IVORY 0xFFFF82AA
#define COLOR_LAWNGREEN 0x7CFC00AA
#define COLOR_SEAGREEN 0x20B2AAAA
#define COLOR_LIMEGREEN 0x32CD32AA //<--- Dark lime
#define COLOR_MIDNIGHTBLUE 0X191970AA
#define COLOR_MAROON 0x800000AA
#define COLOR_OLIVE 0x808000AA
#define COLOR_ORANGERED 0xFF4500AA
#define COLOR_PINK 0xFFC0CBAA // - Light light pink
#define COLOR_SPRINGGREEN 0x00FF7FAA
#define COLOR_TOMATO 0xFF6347AA // - Tomato >:/ sounds wrong lol... well... :P
#define COLOR_YELLOWGREEN 0x9ACD32AA //- like military green
#define COLOR_MEDIUMAQUA 0x83BFBFAA
#define COLOR_MEDIUMMAGENTA 0x8B008BAA // dark magenta ^^
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREY 0xAFAFAFAA



//------Actors------------//
new ActorBusinessman;

//----------Job New------------//
new BankDeliveryJob[256];

main()
{
print("\n----------------------------------");
print(" Future RolePlay Server - NealP");
print("----------------------------------\n");
}



public OnGameModeInit()
{
	ActorBusinessman = CreateActor(76, 1431.0660,-961.1475,36.3253, 1431.0660); //Actor
	AddStaticVehicle(459,1250.6285,-1834.1301,13.4423,1.4745,51,51); //BankDelivery1
	AddStaticVehicle(459,1249.4926,-1811.6958,13.4739,185.6842,51,51); //BankDelivery2
	AddStaticVehicle(459,1280.0493,-1833.0886,13.4418,90.2655,51,51); //BankDelivery3
	AddStaticVehicle(459,1280.4384,-1821.6753,13.4100,92.3024,51,51); //BankDelivery4
	AddStaticVehicle(459,1280.5349,-1811.7463,13.4370,89.3390,51,51); //BankDelivery5
	AddStaticVehicle(459,1279.1827,-1801.5844,13.4368,84.7064,51,51); //BankDelivery6
	SetGameModeText("Welcome to the Future FreeRoam");
	ManualVehicleEngineAndLights();
	DisableInteriorEnterExits();
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}

public OnPlayerConnect(playerid)
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s has joined the server. Welcome!",pName);
SendClientMessageToAll(0xFFFFFFAA,string);

GameTextForPlayer(playerid,"~w~The Future Freeroam",3000,4);
SendClientMessage(playerid,COLOR_WHITE, "Welcome to The {FF0000}F{FFFFFF}uture {00FF00}R{FFFFFF}ole{0080FF}P{FFFFFF}lay");
return 1;
}

public OnPlayerSpawn(playerid)
{
SetPlayerColor(playerid,COLOR_WHITE);
GivePlayerMoney(playerid, 1000);
GivePlayerWeapon(playerid, WEAPON_COLT45,100);
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}


public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/findbankdelivery", cmdtext, true, 0) == 0)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 459)
{
BankDeliveryJob[playerid] = 1;
SetPlayerCheckpoint(playerid,1431.0660,-961.1475,36.3253,123);
SendClientMessage(playerid, COLOR_YELLOW, "* You have been given the coordinates to the area to get the delivery.");
return 1;
}
SendClientMessage(playerid, COLOR_RED,"You have to be in a bank delivery vehicle to do this!");
}
if (strcmp("/kill", cmdtext, true, 10) == 0)
{
if (IsPlayerAdmin(playerid))
SendClientMessage(playerid,COLOR_RED,"You commited suicide.");
SetPlayerHealth(playerid,0);
return 1;
}
if (strcmp("/adminhelp", cmdtext, true, 10) == 0)
{
if (IsPlayerAdmin(playerid))
SendClientMessage(playerid,COLOR_YELLOW,"/adminstarter /skinchange /specplayer /specvehicle /specoff /chouse /cbusiness /cpolice /cbank /view /return /vspawner");
return 1;
}
if (strcmp("/help", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_YELLOW,"/animlist /engine /lock /me /do /b /megaphone /low /ooc /toogleooc /whisper");
return 1;
}
if (strcmp("/adminstarter", cmdtext, true, 10) == 0)
{
if (IsPlayerAdmin(playerid))
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GivePlayerWeapon(playerid,WEAPON_MINIGUN,999999);
GivePlayerWeapon(playerid,WEAPON_M4,999999);
GivePlayerWeapon(playerid,WEAPON_DEAGLE,999999);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
return 1;
}
if (strcmp("/engine", cmdtext, true, 10) == 0)//your command.
{
new vehicleid = GetPlayerVehicleID(playerid);//defining vehicleid is = to GetPlayerVehicleID.
new engine, lights, alarm, doors, bonnet, boot, objective;//these are the defines of the thing used in the command.
if(IsPlayerInAnyVehicle(playerid))//This will check that if a player is in the vehicle or not.
{
if(GetPlayerVehicleSeat(playerid) == 0) //Now this will check that if a player is on the driving seat or not.
{
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);//will check that what is the state of the engine.
if(engine == 1)//will check that if the wngine in on or not.
{
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);//this will check that what is the state of engine.That is is on or off.We can use it for multiple things like doors,alarms etc.But In this case I am using this for the engine only.
SetVehicleParamsEx(vehicleid,false,lights,alarm,doors,bonnet,boot,objective);//when we change the engine and replace it with false,this will turn the vehicle engine off.Same if we make if true,this will make the engine on.
GameTextForPlayer(playerid,"Vehicle Engine Stopped!",2000,6);//for a text to appar on the screen for only 2 seconds.
return 1;
}
else
SetVehicleParamsEx(vehicleid,true,lights,alarm,doors,bonnet,boot,objective);//if vehicle engine is false it will change it to true.
GameTextForPlayer(playerid,"Vehicle Engine Started!",2000,6);//for a text to appar on the screen for only 2 seconds.
}
else SendClientMessage(playerid,-1,"Error: You are not at the driving seat!");//this is an error message,that if a player is not on the driving seat,this error message would appear.
return 1;
}
else
SendClientMessage(playerid,-1,"Error: You are not in a vehicle!");//this is the error message,that if a player is not in the car,the error message would apper.
}
if (strcmp("/lock", cmdtext, true, 10) == 0)//your command.
{
new engine, lights, alarm, doors, bonnet, boot, objective;
new vehicleid = GetPlayerVehicleID(playerid);//defining vehicleid is = to GetPlayerVehicleID.
if(IsPlayerInAnyVehicle(playerid))//Thsi will check that is a player In a vehcile or not.
{
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);//will check that what is the state of the vehicle lock.
if(doors == 1)//will check if the doors are already loocked it not.
{
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,engine,lights,alarm,false,bonnet,boot,objective);//same as the engine one.
GameTextForPlayer(playerid,"Vehicle Unlocked!",2000,6);//for a text to appar on the screen for only 2 seconds.
return 1;
}
else
SetVehicleParamsEx(vehicleid,engine,lights,alarm,true,bonnet,boot,objective);
GameTextForPlayer(playerid,"Vehicle Locked!",2000,6);//for a text to appar on the screen for only 2 seconds.
}
else
SendClientMessage(playerid,-1,"Error: You are not in a vehicle!");//the error message.
}
return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	if(BankDeliveryJob[playerid] > 0)
	{
		BankDeliveryJob[playerid] = 0;
		DisablePlayerCheckpoint(playerid);
	}
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 459)
	{
		if(BankDeliveryJob[playerid] == 1){
		BankDeliveryJob[playerid] = 2;
		SetPlayerCheckpoint(playerid,1431.0660,-961.1475,36.3253,123);
		SendClientMessage(playerid,COLOR_YELLOW,"Deliver them to the backdoor of the Los Santos bank.");
		return 1;
		}
		if(BankDeliveryJob[playerid] == 2){
		BankDeliveryJob[playerid] = 3;
		SetPlayerCheckpoint(playerid,1212.9279,-1815.9828,16.5938,79);
		return 1;
		}
		if(BankDeliveryJob[playerid] == 3){
		BankDeliveryJob[playerid] = 0;
		SendClientMessage(playerid, 0xFFFF00AA, "*Bank Manager: You have delivered our money! Here is a $500 as a reward!");
		SendClientMessage(playerid, 0xFFFF00AA, "Congratulations. You have completed your Bank Delivery route. You have received 500$");
		GivePlayerMoney(playerid, 500);
		DisablePlayerCheckpoint(playerid);
		return 1;
		}
	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)