Although I'm not sure whether this affects anything, but you want it to look like this:
procedure AppOnIdle(Ticks: integer)
begin
if timeleft = 1 then begin
money[blueplayers] := money[blueplayers] + 3500;
end;
end;
Also, if you've created another AppOnIdle procedure it really won't like it. Try putting that under the AppOnIdle that is in the script now, if there is an AppOnIdle procedure.