A little help plz
#1

when i try to compile this with my gm it shows 1 error and warning

new Checkpoint[2],
public OnGameModeInit()
{
gangzone = GangZoneCreate(-385.3699, 1506.446, -256.9133, 1646.58, ),
return 1,
}
public OnPlayerEnterCheckpoint(playerid)
{
if(Checkpoint[playerid] = 1)
{
SendClientMessage(playerid,color,"You're capture the zone, please wait 20 seconds"),
SetTimerEx("SetZone",20000,false,"i",playerid),
}
return 1,
}
forward SetZone(playerid),
public SetZone(playerid)
{
SetPlayerScore(playerid,GetPlayerScore(playerid)+5 ),
GivePlayerCash(playerid,500),
SendClientMessage(playerid,color,"You've capture the zone and receive 500 $ and 5 score"),
if (gTeam[playerid] == TEAM_Latino)
{
GangZoneShowForAll(gangzone,TEAM_Latino_COLOR),
}
else if (gTeam[playerid] == TEAM_Souviet)
{
GangZoneShowForAll(gangzone,TEAK_Souviet_COLOR),
}

else if (gTeam[playerid] == TEAM_Arabian)
{
GangZoneShowForAll(gangzone, TEAM_Arabian_COLOR),
}

else if (gTeam[playerid] == TEAM_USA)
{
GangZoneShowForAll(gangzone, TEAM_USA_COLOR),
}

else if (gTeam[playerid] == TEAM_Europian)
{
GangZoneShowForAll(gangzone, TEAM_Europian_COLOR),
}

else if (gTeam[playerid] == TEAM_Japan)
{
GangZoneShowForAll(gangzone, TEAM_Japan_COLOR),
}
else if (gTeam[playerid] == TEAM_Taliban)
{
GangZoneShowForAll(gangzone, TEAM_Taliban_COLOR),
}
return 1,
}


when i compile it says

C:\Users\DKHG\Desktop\ww\w5.pwn(204) : error 020: invalid symbol name ""
C:\Users\DKHG\Desktop\ww\w5.pwn(1335) : warning 203: symbol is never used: ""
C:\Users\DKHG\Desktop\ww\w5.pwn(1335) : warning 203: symbol is never used: "Streamer_OnGameModeInit"

can someone correct this script plz help
Reply
#2

lol y r u putting ,after every code/line . use ; instead of ,
and define the variаble as new gangzone[MAX_PLAYERS];
Reply
#3

and also put the colour code or define the the color
Reply
#4

sry i am putting ; only...it was a mistake

for gangzone[max_players] u mean this
new gangzone[max_players] instead of new checkpoint[max_players]

for colors u mean this
SendClientMessage(playerid,RED/BLUE/GREEN/FF0000,"You're capture the zone, please wait 20 seconds"),


EDIT:
new Gangzone[2],
public OnGameModeInit()
{
gangzone = GangZoneCreate(-385.3699; 1506.446; -256.9133; 1646.58; );
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(Checkpoint[playerid] = 1)
{
SendClientMessage(playerid;0x7CFC00AA;"You're capture the zone; please wait 20 seconds");
SetTimerEx("SetZone";20000;false;"i";playerid);
}
return 1;
}
forward SetZone(playerid);
public SetZone(playerid)
{
SetPlayerScore(playerid;GetPlayerScore(playerid)+5 );
GivePlayerCash(playerid;500);
SendClientMessage(playerid;0x7CFC00AA;"You've capture the zone and receive 500 $ and 5 score");
if (gTeam[playerid] == TEAM_Latino)
{
GangZoneShowForAll(gangzone;TEAM_LatinoCOLOR);
}
else if (gTeam[playerid] == TEAM_England)
{
GangZoneShowForAll(gangzone;TEAM_EnglandCOLOR);
}

this okay??
Reply
#5

now its

new Gangzone[2],
public OnGameModeInit()
{
gangzone = GangZoneCreate(-385.3699, 1506.446, -256.9133, 1646.58; );
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(Checkpoint[playerid] == 1)
{
SendClientMessage(playerid,0x7CFC00AA,"You're capture the zone; please wait 20 seconds");
SetTimerEx("SetZone",20000,false,"i",playerid);
}
return 1;
}
forward SetZone(playerid);
public SetZone(playerid)
{
SetPlayerScore(playerid,GetPlayerScore(playerid)+5 );
GivePlayerCash(playerid,500);
SendClientMessage(playerid,0x7CFC00AA,"You've capture the zone and receive 500 $ and 5 score");
if (gTeam[playerid] == TEAM_Latino)
{
GangZoneShowForAll(gangzone,TEAM_LatinoCOLOR);
}
else if (gTeam[playerid] == TEAM_England)
{
GangZoneShowForAll(gangzone,TEAM_EnglandCOLOR);
}

return 1;

and errors are

C:\Users\DKHG\Desktop\capture.pwn(204) : error 020: invalid symbol name ""
C:\Users\DKHG\Desktop\capture.pwn(211) : error 017: undefined symbol "Checkpoint"
C:\Users\DKHG\Desktop\capture.pwn(211) : warning 215: expression has no effect
C:\Users\DKHG\Desktop\capture.pwn(211) : error 001: expected token: ";", but found "]"
C:\Users\DKHG\Desktop\capture.pwn(211) : error 029: invalid expression, assumed zero
C:\Users\DKHG\Desktop\capture.pwn(211) : fatal error 107: too many error messages on one line

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


5 Errors.
Reply
#6

pawn Код:
new Checkpoint[2],
new gangzone[MAX_PLAYERS];
public OnGameModeInit()
{
gangzone = GangZoneCreate(-385.3699, 1506.446, -256.9133, 1646.58, );
return 1,
}
public OnPlayerEnterCheckpoint(playerid)
{
if(Checkpoint[playerid] = 1)
{
SendClientMessage(playerid, COLOR_BLUE,"You're capture the zone, please wait 20 seconds");
SetTimerEx("SetZone",20000,false,"i",playerid),
}
return 1,
}
forward SetZone(playerid),
public SetZone(playerid)
{
SetPlayerScore(playerid,GetPlayerScore(playerid)+5 ),
GivePlayerCash(playerid,500),
SendClientMessage(playerid, COLOR_BLUE,"You've capture the zone and receive 500 $ and 5 score");
if (gTeam[playerid] == TEAM_Latino)
{
GangZoneShowForAll(gangzone,TEAM_Latino_COLOR);
}
else if (gTeam[playerid] == TEAM_Souviet)
{
GangZoneShowForAll(gangzone,TEAK_Souviet_COLOR);
}

else if (gTeam[playerid] == TEAM_Arabian)
{
GangZoneShowForAll(gangzone, TEAM_Arabian_COLOR);
}

else if (gTeam[playerid] == TEAM_USA)
{
GangZoneShowForAll(gangzone, TEAM_USA_COLOR);
}

else if (gTeam[playerid] == TEAM_Europian)
{
GangZoneShowForAll(gangzone, TEAM_Europian_COLOR);
}

else if (gTeam[playerid] == TEAM_Japan)
{
GangZoneShowForAll(gangzone, TEAM_Japan_COLOR);
}
else if (gTeam[playerid] == TEAM_Taliban)
{
GangZoneShowForAll(gangzone, TEAM_Taliban_COLOR);
}
return 1,
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)