error 001: expected token: ";", but found "new"
#1

hey all i found this error when i want to compile
error 001: expected token: ";", but found "new"
that's the script

new ZoneAttackTime[sizeof(ZoneInfo)];
new ZoneDeaths[sizeof(ZoneInfo)];
new ZoneAttacker[sizeof(ZoneInfo)] = {-1, ...};
new ZoneID[sizeof(ZoneInfo)];
new Teams[] = {
TEAM_GROVE,
TEAM_BALLAS,
TEAM_LOS_SANTOS_VAGOS,
TEAM_LOS_AZTECAS,

};

thx for help
Reply
#2

Did you defined TEAM_GROVE, TEAM_BALLAS etc.?
If not, TEAM_GROVE is being recognised as a string, so put " before and after it.
Reply
#3

Quote:
Originally Posted by icra
Посмотреть сообщение
Did you defined TEAM_GROVE, TEAM_BALLAS etc.?
If not, TEAM_GROVE is being recognised as a string, so put " before and after it.
i defined the teams
the probleme in this line
new ZoneAttackTime[sizeof(ZoneInfo)];
Reply
#4

Can you tell which line cause the error ? And put the code between ?
Reply
#5

Quote:
Originally Posted by Clad
Посмотреть сообщение
Can you tell which line cause the error ? And put the code between ?
this is the line

new ZoneAttackTime[sizeof(ZoneInfo)];
Reply
#6

before new ZoneAttackTime you are missing ;
Reply
#7

Quote:
Originally Posted by Jefff
Посмотреть сообщение
before new ZoneAttackTime you are missing ;
thx it works

+rep
Reply
#8

removed, above -.-
Reply
#9

Quote:
Originally Posted by mehdi171996
Посмотреть сообщение
this is the line

new ZoneAttackTime[sizeof(ZoneInfo)];
Means the code needs ; before new.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)