[HELP]Backup error
#1

I want to make a Backup script in my server but I have these errors:
Код:
C:\Users\Dani\Desktop\SAMP\gamemodes\***.pwn(2387) : error 029: invalid expression, assumed zero
C:\Users\Dani\Desktop\SAMP\gamemodes\***.pwn(2387 -- 2388) : warning 215: expression has no effect
C:\Users\Dani\Desktop\SAMP\gamemodes\***.pwn(2388) : error 001: expected token: ";", but found "return"
C:\Users\Dani\Desktop\SAMP\gamemodes\***.pwn(2388) : error 079: inconsistent return types (array & non-array)
C:\Users\Dani\Desktop\SAMP\gamemodes\***.pwn(2388) : fatal error 107: too many error messages on one line
Lines:
pawn Код:
[2380]public BackupTimer()
[2381]{
[2382]       for(new x = 0; x < MAX_PLAYERS; x++)
[2383]       {
[2384]       if(!IsPlayerConnected(x) || !Logged(x) || IsPlayerNPC(x)) continue;
[2385]       BackupTime[x] += BackTime;
[2386]       if(BackupTime[x] >= BackTimeSave)
[2387]       }
[2388]       return 1;
[2389]}
(Sorry for my English)
Reply
#2

Try this :
pawn Код:
public BackupTimer()
{
       for(new x = 0; x < MAX_PLAYERS; x++)
       {
       if(!IsPlayerConnected(x) || !Logged(x) || IsPlayerNPC(x)) continue;
       BackupTime[x] += BackTime;
       if(BackupTime[x] >= BackTimeSave) return 1;
       }
}
Reply
#3

More errors :/
Reply
#4

I solved it! Thank you!!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)