SA-MP Forums Archive
compound statement not closed at the end of file (started at line __)) - 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)
+--- Thread: compound statement not closed at the end of file (started at line __)) (/showthread.php?tid=374958)



compound statement not closed at the end of file (started at line __)) - Mr.Faqahat - 04.09.2012

Hello i was wondering why this error is appearing
The Script is

Quote:





public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new model = GetVehicleModel( vehicleid );
if (model == 400)
{
GameTextForPlayer(playerid,"~w~Landstalker",3000,1 );
}
if (model == 401)
{
GameTextForPlayer(playerid,"~w~Bravura",3000,1);
}
if (model == 402)
{
GameTextForPlayer(playerid,"~w~Buffalo",3000,1);
}
if (model == 403)
{
GameTextForPlayer(playerid,"~w~Linerunner",3000,1) ;
}
if (model == 404)
{
GameTextForPlayer(playerid,"~w~Perenniel",3000,1);
}
if (model == 405)
{
GameTextForPlayer(playerid,"~w~Sentinel",3000,1);
}
if (model == 406)
{
GameTextForPlayer(playerid,"~w~Dumper",3000,1);
}
if (model == 407)
{
GameTextForPlayer(playerid,"~w~Firetruck",3000,1);
}
if (model == 40
{
GameTextForPlayer(playerid,"~w~Trashmaster",3000,1 );
}
if (model == 409)
{
GameTextForPlayer(playerid,"~w~Stretch",3000,1);
}
if (model == 410)
{
GameTextForPlayer(playerid,"~w~Manana",3000,1);
}
if (model == 411)
{
GameTextForPlayer(playerid,"~w~Infernus",3000,1);
}
if (model == 412)
{
GameTextForPlayer(playerid,"~w~Voodoo",3000,1);
}
if (model == 413)
{
GameTextForPlayer(playerid,"~w~Pony",3000,1);
}
if (model == 414)
{
GameTextForPlayer(playerid,"~w~Mule",3000,1);
}
if (model == 415)
{
GameTextForPlayer(playerid,"~w~Cheetah",3000,1);
}
if (model == 416)
{
GameTextForPlayer(playerid,"~w~Ambulance",3000,1);
}
if (model == 417)
{
GameTextForPlayer(playerid,"~w~Leviathan",3000,1);
}
if (model == 41
{
GameTextForPlayer(playerid,"~w~Moonbeam",3000,1);
}
Error
Quote:

error 030: compound statement not closed at the end of file (started at line 4513)




Re: compound statement not closed at the end of file (started at line __)) - MarkoN - 04.09.2012

add 1 more } at the end , you didnt close the starting bracket

EDIT: you didnt return too so :
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new model = GetVehicleModel( vehicleid );
if (model == 400)
{
GameTextForPlayer(playerid,"~w~Landstalker",3000,1 );
}
if (model == 401)
{
GameTextForPlayer(playerid,"~w~Bravura",3000,1);
}
if (model == 402)
{
GameTextForPlayer(playerid,"~w~Buffalo",3000,1);
}
if (model == 403)
{
GameTextForPlayer(playerid,"~w~Linerunner",3000,1) ;
}
if (model == 404)
{
GameTextForPlayer(playerid,"~w~Perenniel",3000,1);
}
if (model == 405)
{
GameTextForPlayer(playerid,"~w~Sentinel",3000,1);
}
if (model == 406)
{
GameTextForPlayer(playerid,"~w~Dumper",3000,1);
}
if (model == 407)
{
GameTextForPlayer(playerid,"~w~Firetruck",3000,1);
}
if (model == 40
{
GameTextForPlayer(playerid,"~w~Trashmaster",3000,1 );
}
if (model == 409)
{
GameTextForPlayer(playerid,"~w~Stretch",3000,1);
}
if (model == 410)
{
GameTextForPlayer(playerid,"~w~Manana",3000,1);
}
if (model == 411)
{
GameTextForPlayer(playerid,"~w~Infernus",3000,1);
}
if (model == 412)
{
GameTextForPlayer(playerid,"~w~Voodoo",3000,1);
}
if (model == 413)
{
GameTextForPlayer(playerid,"~w~Pony",3000,1);
}
if (model == 414)
{
GameTextForPlayer(playerid,"~w~Mule",3000,1);
}
if (model == 415)
{
GameTextForPlayer(playerid,"~w~Cheetah",3000,1);
}
if (model == 416)
{
GameTextForPlayer(playerid,"~w~Ambulance",3000,1);
}
if (model == 417)
{
GameTextForPlayer(playerid,"~w~Leviathan",3000,1);
}
if (model == 41
{
GameTextForPlayer(playerid,"~w~Moonbeam",3000,1);
}
return 1;
}



Re: compound statement not closed at the end of file (started at line __)) - Mr.Faqahat - 04.09.2012

Quote:
Originally Posted by MarkoN
Посмотреть сообщение
add 1 more } at the end , you didnt close the starting bracket

EDIT: you didnt return too so :
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new model = GetVehicleModel( vehicleid );
if (model == 400)
{
GameTextForPlayer(playerid,"~w~Landstalker",3000,1 );
}
if (model == 401)
{
GameTextForPlayer(playerid,"~w~Bravura",3000,1);
}
if (model == 402)
{
GameTextForPlayer(playerid,"~w~Buffalo",3000,1);
}
if (model == 403)
{
GameTextForPlayer(playerid,"~w~Linerunner",3000,1) ;
}
if (model == 404)
{
GameTextForPlayer(playerid,"~w~Perenniel",3000,1);
}
if (model == 405)
{
GameTextForPlayer(playerid,"~w~Sentinel",3000,1);
}
if (model == 406)
{
GameTextForPlayer(playerid,"~w~Dumper",3000,1);
}
if (model == 407)
{
GameTextForPlayer(playerid,"~w~Firetruck",3000,1);
}
if (model == 40
{
GameTextForPlayer(playerid,"~w~Trashmaster",3000,1 );
}
if (model == 409)
{
GameTextForPlayer(playerid,"~w~Stretch",3000,1);
}
if (model == 410)
{
GameTextForPlayer(playerid,"~w~Manana",3000,1);
}
if (model == 411)
{
GameTextForPlayer(playerid,"~w~Infernus",3000,1);
}
if (model == 412)
{
GameTextForPlayer(playerid,"~w~Voodoo",3000,1);
}
if (model == 413)
{
GameTextForPlayer(playerid,"~w~Pony",3000,1);
}
if (model == 414)
{
GameTextForPlayer(playerid,"~w~Mule",3000,1);
}
if (model == 415)
{
GameTextForPlayer(playerid,"~w~Cheetah",3000,1);
}
if (model == 416)
{
GameTextForPlayer(playerid,"~w~Ambulance",3000,1);
}
if (model == 417)
{
GameTextForPlayer(playerid,"~w~Leviathan",3000,1);
}
if (model == 41
{
GameTextForPlayer(playerid,"~w~Moonbeam",3000,1);
}
return 1;
}
Ty rep+