| View previous topic :: View next topic |
| Author |
Message |
xearo Newbie
Joined: 01 Oct 2004 Posts: 18
|
Posted: Wed Nov 03, 2004 3:21 am Post subject: im getting an error 10 when it starts my backup routine |
|
|
now i cannot understand what commands are nested too deeply within the following code
i get an error 10 at the start of this routine
anyone have any suggestions
| Code: |
:Backup
REM --- Backup Here ---
if @equal(%%hide,1)
WINDOW NORMAL, Backup Manager
end
DIALOG CURSOR, WAIT
INIFILE OPEN, Settings.ini
IF @equal(%%timedrun,1)
if @NOT(@GREATER(%%min,%%lastbackup))
goto evloop
end
end
LIST SEEK, LIST1,0
%c = @count(LIST1)
repeat
%%curfile = @next(list1)
DIALOG SET, STATUS1, Copying %%curfile to %%backuppath
FILE COPY, %%curfile, %%backuppath
%%filename = @name(%%curfile).@ext(%%curfile)
wait
FILE RENAME, %%backuppath\%%filename, %%backuppath\@datetime(dd_mm_yy)_%%filename
if @not(@ok())
%R = @msgbox(File copy of %%curfile did not succeed. @cr()Please make sure the file is not in use!,Failure,$040)
INIFILE WRITE, Info, LastBackup, Last Backup failed on @datetime(dd/mm/yy)
exit
end
%x = @succ(%x)
until @equal(%c,%x)
INIFILE WRITE, Info, LastBackup, @datetime(dddd) the @datetime(dd) of @datetime(mmmm)
DIALOG SET, STATUS1, Backup Finished!
%%lastbackup = @datetime(n)
if @equal(%%hide,1)
WINDOW HIDE, Backup Manager
end
exit |
Best Regards
Xearo |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Wed Nov 03, 2004 9:16 am Post subject: |
|
|
it is advisable to avoid getting out of IF...END beyond 1 or 2 deep as i have found the same problem with code such as
| Code: | IF @equal(%%timedrun,1)
if @NOT(@GREATER(%%min,%%lastbackup))
goto evloop
end
end
|
work it so that you GOTO EVLOOP within the 1 IF...END
IMHO
serge |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Wed Nov 03, 2004 11:17 pm Post subject: |
|
|
If you are using GOSUB Backup, you don't want Backup to "goto" anything, it should "exit" and then the line after GOSUB Backup can "goto" wherever.. like evloop. _________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
xearo Newbie
Joined: 01 Oct 2004 Posts: 18
|
Posted: Wed Nov 03, 2004 11:21 pm Post subject: |
|
|
| Serge wrote: | it is advisable to avoid getting out of IF...END beyond 1 or 2 deep as i have found the same problem with code such as
| Code: | IF @equal(%%timedrun,1)
if @NOT(@GREATER(%%min,%%lastbackup))
goto evloop
end
end
|
work it so that you GOTO EVLOOP within the 1 IF...END
IMHO
serge |
hmm
now it seems to work
btw i do get a line number and it is line 204 which is where the label starts
:backup
cheers for the help guys |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|