PDA

View Full Version : Urgent Help! Error 36 empty statment


Jabien225
08/05/2016, 05:23 AM
:mad:
// This is a comment
//uncomment the line below if you want to write a filterscripts
//#define FILTERSCRIPT

//texttext

#define BLUE 0xFF004080
#define BLU 0x111ED1FF
#include <YSI/y_ini>
#include <a_samp>
#include "../include/gl_common.inc"
#include <file>
#pragma tabsize 0

new playersconnected=0;

#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(" Server By JC ");
print("----------------------------------\n");
}

#define Skinid 1
#define Money 2
#define Faction 3
#define Job 4
#define AdminLevel 5
#define Level 6
////////////////////*/
#define Civilian 0
#define Police 1
#define Taxi 2
//-------------//
new bool:newPlayer,bar,lspddoor,armour;
new player [MAX_PLAYERS][7];//The settings values are stored here
new setts[7][]={"password","money","faction","job","AdminLevel","level"};//An array containing the textual identifiers
new playerPass[Max_PLAYERS][128];//The players password are stored in this array
new Text:mytext;


public OnGameModeInit()
{
//Don't use these lines if it's a filterscript
SetGameModeText("GoinCann");
AddPlayerClass(178,1958.3783,1343.1572,15.3746,269 .1425,38,999,0,0,0,0); // spawn
AddPlayerClass(299,1958.3783,1343.1572,15.3746,269 .1425,0,0,0,0,0,0); // spawn
AddPlayerClass(107,1958.3783,1343.1572,15.3746,269 .1425,0,0,0,0,0,0); // spawn
AddPlayerClass(104,1958.3783,1343.1572,15.3746,269 .1425,0,0,0,0,0,0); // spawn
//------------------------AUTOS ----------------------------------------------
AddStaticVehicle(420,2038.6755,1333.8046,10.4558,0 .0441,2,8); // Taxi LV
AddStaticVehicle(420,2038.8555,1350.1155,10.4510,3 58.3014,3,4); // Taxi LV 2
AddStaticVehicle(420,2039.4915,1372.9547,10.4506,0 .1861,6,8); // Taxi LV 3
AddStaticVehicle(416,2035.6119,-1438.1849,17.4484,180.9867,1,3); // EMS 1
AddStaticVehicle(416,2018.2042,-1411.9534,17.1429,88.9248,1,3); // EMS 2
AddStaticVehicle(416,2009.0743,-1411.5493,17.1980,88.6632,1,3); // EMS 3

//Fences
CreateObject(922, 1544.6911621094, -1622.0278320313, 14.102454185486, 0, 0, 90);
CreateObject(922, 1544.6866455078, -1619.5272216797, 14.110140800476, 0, 0, 90);
CreateObject(922,1545.2962646484, -1634.3321533203, 14.109854698181, 0, 0, 90);

ConnectNPC("JC","NPC_walk");
return 1;
}

foward Spawn(playerid);
public OnPlayerRequestClass(playerid, classid)
{
if(!IsPlayerNPC(playerid))
{
SetPlayerPos(playerid,1544.7887,-1675.4630,13.5591);
SetPlayerFacingAngle(playerid,90.0);
SetPlayerCameraPos(playerid, 1541.5293,-1675.4012,13.5527);
SetPlayerCameraLookAt(playerid, 1544.7887,-1675.4630,13.5591);
}
else
{
SetTimerEx("Spawn",1,false,"i",playerid);
}
}
return 1;
}
/////////////////////------YSI------------/////////////////
forward LoadSettings(playerid, name[],Value[]);
public LoadSettomgs(playerid, name[], value[])
{
for(new i=0; i<7; i++
{
if(i==0)
{
INI_String(settsp[i],playerPass[playerid],128);
}
else
{

INI_Int(setts[i],player[playerid][i]);
}
}
return 0;
}
//---------------------------------//

public OnPlayerConnect(playerid)
{
if(!IsPlayerNPC(playerid))
{
newPlayer = false;
TogglePlayerSpectating(playerid,1);
new string[256], name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(string,256,"~r~Hello %s !",name);
GameTextForPlayer(playerid,string,10000,6);
format(string,256,"Players/%s.ini",name);
MyTextDraw(playerid);
if(fexist(string))
{

INI_ParseFile(string,"LoadSettings", .bExtra=true, .extra=playerid);
SetPlayerScore(playerid,player[playerid][Level]);
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Login","Welcome! Please Login!","Exit");
}
else
{
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Register","Welcome! Please Register!","Register!","Exit");
newPlayer = true;
}
}
return 1;
}

Public OnPlayerDisconnect(playerid, reason)
{
SavePlayerSettings(playerid);
return 1;
}

public OnPlayerSpawn(playerid)
{
if(!IsPlayerNPC(playerid))
{
if{newplayer)
{
player[playerid][Skinid]= GetPlayerSkin(playerid);
}
GivePlayerMoney(playerid,player[playerid][Money]);
SetPlayerSkin(playerid, [playerid][Skinid]);
TextDrawHideForPlayer(playerid][Skinid]);
TextDrawDestroy(mytext);
}
else SetPlayerSkin(playerid, 167);
return 1;
}

forward Initpos();
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128],idx;
cmd = strtok(cmdtext,idx);
if(strcmp(cmd,"/tele",true)==0)
{
new tmp[128];
tmp = strtok(cmdtext,idx);
if(strlen(tmp)==0) return SendClientMessage(playerid,BLUE,"Usage: /Tele 1");
if(strval(tmp)==1)
SetPlayerPos(playerid,1885.7004,-2592.2048,13.5469);
else return SendClientMessage(playerid,BLUE,"Usage: /tele 1");
return 1;
}
if(strcmp(cmdtext,"/veh",true)==0)
{
ShowPlayerDialog(playerid,3,DIALOG_STYLE_LIST,"Vehicles","1.Rhino\n2.Firetruck\n.3Infernus\n4.Turismo\n5.Dum per","Spawn","Exit");
return 1;
}

if(strcmp(cmdtext,"/openbarrier",true)==0)
{
switch(player[playerid][Faction])
{
case 0: SendClientMessage(playerid,BLUE,"You A Civilian");
case 1: SendClientMessage(playerid,BLUE,"You A Police Officer!");
case 2: SendClientMessage(playerid,BLUE,"You A TaxiDriver");
}
return 1;
}

if(strcmp(cmdtext,"/anim",true==0)
{
ApplyAnimation(playerid,"ped","FALL_collapse",4.0,0,0,0,0,0);
return 1;
}

return 0;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
new Float:armr; GetPlayerArmour(playerid,armr);
if(pickupid == armour && armr != 100.0);
{
SetPlayerArmour(playerid,100.0);
PlayerPlaySound(playerid,1150,0.0,0.0,0.0);
}
return 1;
}

public OnPlayerUpdate(playerid)
{
//infinite ammo
if(GetPlayerAmmo(playerid) <= 10) SetPlayerAmmo(playerid,38,989);
if(IsPlayerInRangeOfPoint(playerid,3.0,246.4075,72 .4802,1003.6406))
{
MoveObject(lspddoor,250.19433594,72.58398438,1005. 39929199,4.0);
SetTimer("InitPos",2000.false);
}
return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new Float:x,Float:y,Float:z;
switch(dialogid)
{
case 3:
{
if(response==1)
{
switch(listitem)
{
case 0:
{
GetPlayerPos(playerid,x,y,z);
CreateVehicle(432,x-3.0,y,z,0.0,1,1,300);
}
case 1:
{
GetPlayerPos(playerid,x,y,z);
CreateVehicle(407,x-3.0,y,z,0.0,1,1,300);
}
case 2:
{
GetPlayerPos(playerid,x,y,z);
CreateVehicle(411,x-3.0,y,z,0.0,1,1,300);
}
case 3:
{
GetPlayerPos(playerid,x,y,z);
CreateVehicle(451,x-3.0,y,z,0.0,1,1,300);
}
case 4:
{
GetPlayerPos(playerid,x,y,z);
CreateVehicle(406,x-3.0,y,z,0.0,1,1,300);
}
}
}
}
case 1:
{
if(response==1)
{
if(strcmp(playerPass[playerid],inputtext,false,strlen(inputtext))!=0)
{
SendClientMessage(playerid,BLUE,"Invalid Password!");
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Login","Welcome! Please Login!","Login","Exit");
}
else TogglePlayerSpectating(playerid,0);
}
else Kick(playerid);
}
case 2:
{
if(response==1)
{
strcat(playerPass[playerid],inputtext,128);
TogglePlayerSpectating(playerid,0);
}
else Kick(playerid);
}
}
return 1;
}

/////////////////////-------YSI-------------/////////////////////////
SavePlayerSettings(playerid)
{
new string[256],name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(string,256,"players/%s.ini",name);
//Open the file(if doesn't exist it will be created)
new INI:acc = INI_Open(string);
for(new i=0; i<7; i++)
{
if(i==0)
INI_WriteString(acc,setts[i],playerPass[playerid]); //Wrtite The Passwords to the Player's file
else INI_WriteInt(acc,setts[i],player[playerid][i]); //Write the other Values to the player's file
}
INI_Close(acc); //close the file
}
//------------------------------//

public Spawn(playerid)
{
SpawnPlayer(playerid);
}






Can Someone reDO this for me Please ! Urgent Help!

K0P
08/05/2016, 05:37 AM
On which line the error is showing.

Dayrion
08/05/2016, 06:23 AM
Hey.
Use marker [pawn] and include your code between those balise.
You need to give us what is the exactly error and which line is it.

iggy1
08/05/2016, 07:01 AM
Not sure how i spotted it in all that plain text (lucky i guess)..

OnPlayerRequestClass has 3 opening braces but 4 closing braces.

There could be more problems there, just spotted that one and stopped reading.

Sew_Sumi
08/05/2016, 08:04 AM
iggy1 has it right. OnPlayerRequestClass, OnPlayerSpawn and OnPlayerCommandText all have mismatched brackets.

Indentation would make it a lot easier to read and debug. I'm simply lucky I have NotePad++ here.

Micko123
08/05/2016, 08:10 AM
please use [code]

BiosMarcel
08/05/2016, 08:39 AM
Hey.
Use marker [pawn] and include your code between those balise.
You need to give us what is the exactly error and which line is it.

I suggest to use [php] instead :)