Error message: : error 030: compound statement not closed at the end of file (started at line 170)
#1

PHP Code:
#pragma unused ret_memcpy
#include <a_samp>
#include <colors>
#include <Dudb>
#include <Dini>
#include <MidoStream>
#include <a_npc>
#include <foreach>
#include <JunkBuster> // Anti cheat
#include <VehicleHealthBar>
#include <bodyparts>
// Define all the callbacks I need
#define TEAM_USA 1
#define TEAM_COLOR_USA COLOR_BLUE
#define TEAM_JAPAN 2
#define TEAM_COLOR_JAPAN COLOR_WHITE
#define TEAM_GERMANY 3
#define TEAM_COLOR_GERMANY COLOR_BROWN
#define TEAM_RUSSIA 4
#define TEAM_COLOR_RUSSIA COLOR_RED
#define TEAM_ENGLAND 5
#define TEAM_COLOR_ENGLAND COLOR_PLUM
#define TEAM_PAKISTAN 6
#define TEAM_COLOR_PAKISTAN COLOR_LIMEGREEN
#define TEAM_INDIA 7
#define TEAM_COLOR_INDIA COLOR_CORAL
#define TEAM_BRAZIL 8
#define TEAM_COLOR_BRAZIL COLOR_AQUA
#define TEAM_FRANCE 9
#define TEAM_COLOR_FRANCE COLOR_INDIGO
#define TEAM_INDONESIA 10
#define TEAM_COLOR_INDONESIA COLOR_BISQUE
// ----- Variables
#define MAX_GANGZONES   15
new Checkpoint[MAX_PLAYERS];
new 
gangzone;
new 
timer;
new 
gTeam[MAX_PLAYERS];
// ----- Callbacks
public OnFilterScriptInit()
{
    
gangzone GangZoneCreate(841.90671674.3941076.1982007.047); // Creating the GangZone
    
return 1;
}
public 
OnFilterScriptExit()
{
    
GangZoneDestroy(gangzone);
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    
SetPlayerCheckpoint(playerid970.76671976.103155); //PINK
    
return 1;
}
public 
OnPlayerEnterCheckpoint(playerid// If the player enters a particluar checkpoint
{
    
SendClientMessage(playerid0x00FF007A"Wait 30 Seconds - To Caputre this gangzone."); // Telling the player to wait 30 seconds.
    
GangZoneFlashForAll(gangzone,  0xFF80FF76); // Makes the turf Flash Pink ( telling everyone its being taken over )
    
SendClientMessageToAll(0xFF80FFFF"The gangzone is being taken over"); // Sending Message to all players.
    
timer SetTimerEx("SetZone"30000false"i"playerid); // Setting the Timer... ( 30 seconds )
    
Checkpoint[playerid] = 1// Telling the variable that the player is in the checkpoint.
    
return 1;
}
public 
OnPlayerLeaveCheckpoint(playerid)
{
    if(
Checkpoint[playerid] == 1)
    {
        
SendClientMessage(playerid0x00FF007A" You have left the checkpoint , You have failed to capture");
        
GangZoneStopFlashForAll(gangzone);
        
SendClientMessageToAll(0x00FF007A"gangzone was not taken over");
        
KillTimer(timer);
        
Checkpoint[playerid] = 0;
    }
    else
    {
        
// nothing
    
}
    return 
1;
}
// Custom Callbacks
forward SetZone(playerid);
public 
SetZone(playerid)
{
        
gTeam[playerid] = TEAM_USA;
        {
        
GangZoneShowForAll(gangzone,TEAM_COLOR_USA);
    }
        if(
gTeam[playerid] == TEAM_JAPAN)
    {
        
GangZoneShowForAll(gangzone,TEAM_COLOR_JAPAN);
    }
        if(
gTeam[playerid] == TEAM_GERMANY)
    {
        
GangZoneShowForAll(gangzone,TEAM_COLOR_GERMANY);
    }
        if(
gTeam[playerid] == TEAM_RUSSIA)
    {
        
GangZoneShowForAll(gangzone,TEAM_COLOR_RUSSIA);
    }
        if(
gTeam[playerid] == TEAM_ENGLAND)
    {
        
GangZoneShowForAll(gangzone,TEAM_COLOR_ENGLAND);
    }
        if(
gTeam[playerid] == TEAM_PAKISTAN)
    {
        
GangZoneShowForAll(gangzone,TEAM_COLOR_PAKISTAN);
    }
        if(
gTeam[playerid] == TEAM_FRANCE)
    {
        
GangZoneShowForAll(gangzone,TEAM_COLOR_FRANCE);
    }
        if(
gTeam[playerid] == TEAM_INDIA)
    {
        
GangZoneShowForAll(gangzone,TEAM_COLOR_INDIA);
    }
        if(
gTeam[playerid] == TEAM_BRAZIL)
    {
        
GangZoneShowForAll(gangzone,TEAM_COLOR_BRAZIL);
    }
        if(
gTeam[playerid] == TEAM_INDONESIA)
    {
        
GangZoneShowForAll(gangzone,TEAM_COLOR_INDONESIA);
        return 
1;
    }
        if(
Checkpoint[TEAM_USA]  == 1)
    {
        
GangZoneShowForAll(gangzoneCOLOR_BLUE ); // Showing the GangZone with the new colour
        
        
if(Checkpoint[TEAM_JAPAN]  == 1)
    {
        
GangZoneShowForAll(gangzoneCOLOR_WHITE ); 
        
        
Checkpoint[playerid] = 0;
        
        if(
Checkpoint[TEAM_GERMANY]  == 1)
    {
        
GangZoneShowForAll(gangzoneCOLOR_BROWN );
        
Checkpoint[playerid] = 0;
        
        if(
Checkpoint[TEAM_RUSSIA]  == 1)
    {
        
GangZoneShowForAll(gangzoneCOLOR_RED );
        if(
Checkpoint[TEAM_ENGLAND]  == 1)
    {
        
GangZoneShowForAll(gangzoneCOLOR_PLUM );
        
Checkpoint[playerid] = 0;
        if(
Checkpoint[TEAM_PAKISTAN]  == 1)
    {
        
GangZoneShowForAll(gangzoneCOLOR_LIMEGREEN );
        
Checkpoint[playerid] = 0;
        if(
Checkpoint[TEAM_INDIA]  == 1)
    {
        
GangZoneShowForAll(gangzoneCOLOR_CORAL );
        if(
Checkpoint[TEAM_BRAZIL]  == 1)
    {
        
GangZoneShowForAll(gangzoneCOLOR_AQUA );
        
Checkpoint[playerid] = 0;
        if(
Checkpoint[TEAM_FRANCE]  == 1)
    {
        
GangZoneShowForAll(gangzoneCOLOR_INDIGO );
        
Checkpoint[playerid] = 0;
        
        if(
Checkpoint[TEAM_INDONESIA]  == 1)
    {
        
GangZoneShowForAll(gangzoneCOLOR_BISQUE );
        
Checkpoint[playerid] = 0;
        
GangZoneStopFlashForAll(gangzone); // Stopping it Flashing.
        
GangZoneHideForAll(gangzone); // Hiding the GangZone
        
SendClientMessageToAll(0x00FF007A"gangzone Has Been Captured By Attacker");
        
SetPlayerScore(playerid,GetPlayerScore(playerid)+);
        
GivePlayerMoney(playerid,6000);
        
SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
        
Checkpoint[playerid] = 1
Reply
#2

Do you actually want help? Use [pawn] tags not [php]. And at LEAST put a comment on the line the error starts. I know it's line 170 but i don't want to count through.
Reply
#3

there u go
http://pastebin.com/u1CnaYrB
Reply
#4

https://sampwiki.blast.hk/wiki/Scripting_Basics
https://sampwiki.blast.hk/wiki/PAWN_for_Beginners
https://sampwiki.blast.hk/wiki/PAWN_tutorial

http://en.wikipedia.org/wiki/Talk%3AIndent_style

You need to learn to script. And indent.

If the code was decently indented you probably would have prevented this error. One thing i seen straight away is that you don't have a closing brace on your "SetZone" function, which made me instantly think there will be a hell of a lot more wrong with the code.

There's no point in people helping you, if you wont help yourself. You need to learn.
Reply
#5

pawn Code:
{
        GangZoneShowForAll(gangzone, COLOR_BISQUE );
        Checkpoint[playerid] = 0;
        GangZoneStopFlashForAll(gangzone); // Stopping it Flashing.
        GangZoneHideForAll(gangzone); // Hiding the GangZone
        SendClientMessageToAll(0x00FF007A, "gangzone Has Been Captured By Attacker");
        SetPlayerScore(playerid,GetPlayerScore(playerid)+5 );
        GivePlayerMoney(playerid,6000);
        SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
        Checkpoint[playerid] = 1;  
    }
}
Reply
#6

still i get error here http://pastebin.com/JApbBeSz
Code:
D:\sampserver\pawno\capturezoneneedtobefixed.pwn(197) : error 030: compound statement not closed at the end of file (started at line 174)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)