Some help for this mistakes
#1

Quote:

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

#include <a_samp>

main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}

#include <dini>
#include <dudb>
#include <gl_common>
#include <foreach>
#include <a_zones>

#define TEAM_Latino 1
#define TEAM_Souviet 2
#define TEAM_Arabian 3
#define TEAM_USA 4
#define TEAM_Europian 5
#define TEAM_Japan 6
#define TEAM_Taliban 7

#define TEAM_Latino_COLOR 0x00F3FFAF
#define TEAM_Souviet_COLOR 0xCA0000FF
#define TEAM_Arabian_COLOR 0xD70000FF
#define TEAM_USA_COLOR 0x1400C3FF
#define TEAM_Europian_COLOR 0x005E0089
#define TEAM_Japan_COLOR 0xFAFAFFFF
#define TEAM_Taliban_COLOR 0xFFFFFFFF




new gTeam[MAX_PLAYERS];
new EnteredArea5[MAX_PLAYERS];



new EnteredArea[MAX_PLAYERS];
new CapturedBy1; // 0 ( none ) 1 ( USA ) 2 ( Germany )

new T1[MAX_PLAYERS];

new IfCapture[2];
new uscore;
new A;
new AU;
new AG;
new CheckForLevelUpdate






public AreaCheck()
{
foreach(Player, i)
{
if(IsPlayerInArea(i, 105,1009, 1775,037, 373,692, 1950,205))
{
if(EnteredArea5[i] == 0) // if he hasn't entered before
{
if(gTeam[i] == TEAM_USA && CapturedBy1 == 1 || gTeam[i] == TEAM_Japan && CapturedBy1 == 2 || gTeam[i] == TEAM_Japan && CapturedBy1 == 3 || gTeam[i] == TEAM_USA && CapturedBy1 == 4)
{
SendClientMessage(i,0x23FF00FF, "This area has already been captured by your team!");
EnteredArea5[i] = 1;
}
else
{
EnteredArea5[i] = 1; // He has entered
SendClientMessage(i,0x23FF00FF, "Stay In here for 30 seconds to take over the area!");
T1[i] = SetTimer("TakeOver",30000,0);
SendClientMessageToAll(0x23FF00FF, "Area 69 is being taken over!");
}
}
}
else
{
EnteredArea5[i] = 0; // When he leaves, he's no longer in the area
KillTimer(T1[i]);
}
}
return 1;
}

public TakeOver()
{
foreach(Player, i)
{
if(IsPlayerInArea(i, 1105,1009, 1775,037, 373,692, 1950,205) && gTeam[i] == TEAM_USA)
{
if(CapturedBy1 != 1)
{
if( IfCapture[1] == 1 ) return 1;
IfCapture[1] = 0;
dini_IntSet("/Variables/Variables.ini", "CapturedBy5", 1);
//SetTimer("ScoreText", 5000, 0);
uscore++;
SetPlayerScore(i, GetPlayerScore(i) + 2);
CapturedBy1 = 1;
if(CapturedBy1 != 2)SendClientMessageToAll(0xEBFF00FF, "NEWS: Team USA have captured area 69!");
GangZoneHideForAll(A);
GangZoneShowForAll(AU, 0xFF00C3FF);
GangZoneHideForAll(AG);
dini_IntSet("/Variables/Variables.ini", "uscore", uscore);
CheckForLevelUpdate(i);
}
}
else if(IsPlayerInArea(i, 105,1009, 1775,037, 373,692, 1950,205) && gTeam[i] == TEAM_GERMANY)
{
if(CapturedBy5 != 2)
{
if( IfCapture[5] == 1 ) return 1;
IfCapture[5] = 0;
dini_IntSet("/Variables/Variables.ini", "CapturedBy5", 2);
gscore++;
//SetTimer("ScoreText", 5000, 0);
SetPlayerScore(i, GetPlayerScore(i) + 2);
CapturedBy5 = 2;
if(CapturedBy != 1)SendClientMessageToAll(COLOR_CON_GREEN, "NEWS: Team GERMANY have captured area 69!");
GangZoneHideForAll(A);
GangZoneShowForAll(AG, COLOR_RED);
GangZoneHideForAll(AU);
dini_IntSet("/Variables/Variables.ini", "gscore", gscore);
CheckForLevelUpdate(i);
}
}
}
return 1;
}

Quote:

C:\My Server\gamemodes\Teams.pwn(61) : error 001: expected token: ";", but found "public"
C:\My Server\gamemodes\Teams.pwn(65) : warning 202: number of arguments does not match definition
C:\My Server\gamemodes\Teams.pwn(65) : warning 202: number of arguments does not match definition
C:\My Server\gamemodes\Teams.pwn(65) : warning 202: number of arguments does not match definition
C:\My Server\gamemodes\Teams.pwn(65) : warning 202: number of arguments does not match definition
C:\My Server\gamemodes\Teams.pwn(89) : warning 217: loose indentation
C:\My Server\gamemodes\Teams.pwn(92) : warning 235: public function lacks forward declaration (symbol "TakeOver")
C:\My Server\gamemodes\Teams.pwn(96) : warning 202: number of arguments does not match definition
C:\My Server\gamemodes\Teams.pwn(96) : warning 202: number of arguments does not match definition
C:\My Server\gamemodes\Teams.pwn(96) : warning 202: number of arguments does not match definition
C:\My Server\gamemodes\Teams.pwn(96) : warning 202: number of arguments does not match definition
C:\My Server\gamemodes\Teams.pwn(112) : error 012: invalid function call, not a valid address
C:\My Server\gamemodes\Teams.pwn(112) : warning 215: expression has no effect
C:\My Server\gamemodes\Teams.pwn(112) : error 001: expected token: ";", but found ")"
C:\My Server\gamemodes\Teams.pwn(112) : error 029: invalid expression, assumed zero
C:\My Server\gamemodes\Teams.pwn(112) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

help please
Reply
#2

Missing a ; at
pawn Code:
new CheckForLevelUpdate
Reply
#3

Thank's For your Help But Please can you correct all my Mistakes
Reply
#4

Line 202 please?

Also, i think you have a mistake here IsPlayerInArea(i, 105,1009, 1775,037, 373,692, 1950,205)
It must be changed like this IsPlayerInArea(i, 105.1009, 1775.037, 373.692, 1950.205)

[NOTSURE]
Reply
#5

On line 65
pawn Code:
if(IsPlayerInArea(i, 105,1009, 1775,037, 373,692, 1950,205))
The coordinates haven't been entered correctly you put a "," instead of "." I believe it should be
pawn Code:
if(IsPlayerInArea(i, 105.1009, 1775.037, 373.692, 1950.205))
and same for line 95
pawn Code:
if(IsPlayerInArea(i, 1105,1009, 1775,037, 373,692, 1950,205) && gTeam[i] == TEAM_USA)
Should be
pawn Code:
if(IsPlayerInArea(i, 1105.1009, 1775.037, 373.692, 1950.205) && gTeam[i] == TEAM_USA)
Reply
#6

-----
Reply
#7

thx guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)