Author Topic: Identifier Expected  (Read 898 times)

0 Members and 3 Guests are viewing this topic.

Offline DarkSpread

  • Major(1)
  • Posts: 25
Identifier Expected
« on: February 18, 2011, 02:31:47 pm »
The part of script that does this problem is:

Code: [Select]
if GetPlayerStat(i, 'Health') = 150 Then If GetPlayerStat(i, 'Team') <> 1 Then Begin
DoDamage(i,1);
GiveBonus(i, 3);

The complete script is:

Code: [Select]
procedure AppOnIdle(Ticks: integer);
var i:byte; var frequenza, danno, saluteattuale, puntiricarica, sogliamaxvita, differenza:integer; Teams: array[0..5] of string;
begin
frequenza := 60; // 30 = mezzo secondo, 15 = 0,25 secondi, 60 = un secondo etc
puntiricarica := 20;
sogliamaxvita := 150; // 150 = tutta la barra della vita viene ricaricata
if Ticks mod frequenza = 0 then begin // una volta ogni mezzo secondo
for i := 1 to 32 do begin // per tutti i giocatori (id da 1 a 32)
if GetPlayerStat(i, 'Alive') then begin // se il giocatore con ID i รจ Vivo
saluteattuale := GetPlayerStat(i, 'Health');
differenza := sogliamaxvita - saluteattuale;
if differenza > puntiricarica then danno := puntiricarica
else danno := differenza
danno := -danno;
DoDamage(i, danno);
end;
end;
end;
if GetPlayerStat(i, 'Health') = 150 Then If GetPlayerStat(i, 'Team') <> 1 Then Begin
DoDamage(i,1);
GiveBonus(i, 3);
end;


What's wrong? :(
« Last Edit: February 18, 2011, 02:33:18 pm by DarkSpread »

Offline Boblekonvolutt

  • Soldier
  • **
  • Posts: 222
  • "YOU are a CAR."
Re: Identifier Expected
« Reply #1 on: February 18, 2011, 03:03:27 pm »
You do not have a closing end;

(Your indentation is lying to you.)
« Last Edit: February 18, 2011, 03:06:23 pm by Boblekonvolutt »

Offline DarkSpread

  • Major(1)
  • Posts: 25
Re: Identifier Expected
« Reply #2 on: February 18, 2011, 04:57:04 pm »
Oh.. lol stupid me. Thanks :P