SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 13/04/2012, 03:31 AM   #1
David5290
Big Clucker
 
Join Date: Jan 2011
Posts: 159
Reputation: 2
Default Error message: : error 030: compound statement not closed at the end of file (started at line 503)

pawn Code:
forward IsPlayerOnAnyBoat(playerid);
        public IsPlayerOnAnyBoat(playerid)
     {
                if(IsPlayerInAnyVehicle(playerid))
                 {
                        new FXF_vehicle = GetVehicleModel(GetPlayerVehicleID(playerid));
                        if(FXF_vehicle == 430 || FXF_vehicle == 446 || FXF_vehicle == 452 || FXF_vehicle == 453 || FXF_vehicle == 454 || FXF_vehicle == 472 || FXF_vehicle == 473 || FXF_vehicle == 484 || FXF_vehicle == 493 || FXF_vehicle == 595) {
                         {
     [B](Line 503)   [/B]                if(IsPlayerConnected(playerid))
        {
                        if(IsPlayerInWater(playerid))
        {
        SendClientMessage(playerid, COLOR_GREEN, "Fish.");
        }
       
return 0;
}

How to close it? Won't let me continue without closing, I don't see anywhere to close it, halfway asleep and can't really think.
David5290 is offline   Reply With Quote
Old 13/04/2012, 03:32 AM   #2
RollTi
Huge Clucker
 
RollTi's Avatar
 
Join Date: Apr 2012
Location: Philippines
Posts: 229
Reputation: 36
Default Re: Error message: : error 030: compound statement not closed at the end of file (started at line 503)

What is in your line 503?
__________________
if you notice me posting in topic that has 'REP+' i'm just want to help other people not to get reputation


New Release [INC]: roAFK - Efficient AFK System (Latest!)
RollTi is offline   Reply With Quote
Old 13/04/2012, 03:34 AM   #3
David5290
Big Clucker
 
Join Date: Jan 2011
Posts: 159
Reputation: 2
Default Re: Error message: : error 030: compound statement not closed at the end of file (started at line 503)

pawn Code:
if(IsPlayerConnected(playerid))
David5290 is offline   Reply With Quote
Old 13/04/2012, 03:35 AM   #4
[HiC]TheKiller
High-roller
 
Join Date: Mar 2008
Location: New Zealand
Posts: 2,629
Reputation: 410
Default Re: Error message: : error 030: compound statement not closed at the end of file (started at line 503)

pawn Code:
if(FXF_vehicle == 430 || FXF_vehicle == 446 || FXF_vehicle == 452 || FXF_vehicle == 453 || FXF_vehicle == 454 || FXF_vehicle == 472 || FXF_vehicle == 473 || FXF_vehicle == 484 || FXF_vehicle == 493 || FXF_vehicle == 595) {
                         {

2 opening brackets?
__________________
[HiC]TheKiller is offline   Reply With Quote
Old 13/04/2012, 03:38 AM   #5
RollTi
Huge Clucker
 
RollTi's Avatar
 
Join Date: Apr 2012
Location: Philippines
Posts: 229
Reputation: 36
Default Re: Error message: : error 030: compound statement not closed at the end of file (started at line 503)

it is a missing brackets/two opening brackets

FIX CODE:

pawn Code:
forward IsPlayerOnAnyBoat(playerid);
public IsPlayerOnAnyBoat(playerid)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        new FXF_vehicle = GetVehicleModel(GetPlayerVehicleID(playerid));
        if(FXF_vehicle == 430 || FXF_vehicle == 446 || FXF_vehicle == 452 || FXF_vehicle == 453 || FXF_vehicle == 454 || FXF_vehicle == 472 || FXF_vehicle == 473 || FXF_vehicle == 484 || FXF_vehicle == 493 || FXF_vehicle == 595)
        {
            if(IsPlayerConnected(playerid))
            {
                if(IsPlayerInWater(playerid))
                {
                    SendClientMessage(playerid, COLOR_GREEN, "Fish.");
                }
            }
        }
    }
    return 0;
}
__________________
if you notice me posting in topic that has 'REP+' i'm just want to help other people not to get reputation


New Release [INC]: roAFK - Efficient AFK System (Latest!)
RollTi is offline   Reply With Quote
Old 13/04/2012, 03:50 AM   #6
David5290
Big Clucker
 
Join Date: Jan 2011
Posts: 159
Reputation: 2
Default Re: Error message: : error 030: compound statement not closed at the end of file (started at line 503)

Heh, I knew that. Thanks for the help guys. Worked.
David5290 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
test.pwn(248) : error 030: compound statement not closed at the end of file (started at line 234) davelord Scripting Help 3 09/01/2012 09:01 PM
(35065) : error 030: compound statement not closed at the end of file (started at line 34889) random123 Scripting Help 2 02/10/2011 06:02 AM
error 030: compound statement not closed at the end of file Sergio Leone Help Archive 7 11/08/2011 03:34 PM
error 030: compound statement not closed at the end of file (started at line 240 w00tNew Help Archive 4 23/12/2009 08:15 AM


All times are GMT. The time now is 03:30 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.