[HELP]Backup error - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP]Backup error (
/showthread.php?tid=326676)
[HELP]Backup error -
Dani669 - 18.03.2012
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)
Re: [HELP]Backup error -
Shabi RoxX - 18.03.2012
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;
}
}
Re: [HELP]Backup error -
Dani669 - 18.03.2012
More errors :/
Re: [HELP]Backup error -
Dani669 - 18.03.2012
I solved it! Thank you!!!!