01.06.2010, 12:30
Helle everyone!
I have a little problem with an array. I have set an online timer and it saves in a file. It is for saving the online time from players.
But at the end when I finished to script it I get some errors..I dunno really how to fix it. Could someone help pls?
ERRORS:
Adminscript.pwn(2711) : error 028: invalid subscript (not an array or too many subscripts): "Seconds"
Adminscript.pwn(2711) : warning 215: expression has no effect
Adminscript.pwn(2711) : error 001: expected token: ";", but found "]"
Adminscript.pwn(2711) : error 029: invalid expression, assumed zero
Adminscript.pwn(2711) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
At this line:
if(Seconds[i] == 0)
I have a little problem with an array. I have set an online timer and it saves in a file. It is for saving the online time from players.
But at the end when I finished to script it I get some errors..I dunno really how to fix it. Could someone help pls?
Код:
public PlayerTime(playerid)
{
new i;
for(i=0;i<MAX_PLAYERS;i++)
if(IsPlayerConnected(i))
{
if(Seconds[i] == 0)
{
Seconds[i]++;
}else if(Seconds[i] == 60 && Minutes[i] < 60)
{
Seconds[i] = 0;
Minutes[i]++;
}
if(Minutes[i] == 60 && Hours[i] < 60)
{
Minutes[i] = 0;
Hours[i]++;
}
if(Hours[i] == 60){
Hours++;
}
}
}
Adminscript.pwn(2711) : error 028: invalid subscript (not an array or too many subscripts): "Seconds"
Adminscript.pwn(2711) : warning 215: expression has no effect
Adminscript.pwn(2711) : error 001: expected token: ";", but found "]"
Adminscript.pwn(2711) : error 029: invalid expression, assumed zero
Adminscript.pwn(2711) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
At this line:
if(Seconds[i] == 0)

