forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


im getting an error 10 when it starts my backup routine

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
xearo
Newbie


Joined: 01 Oct 2004
Posts: 18

PostPosted: Wed Nov 03, 2004 3:21 am    Post subject: im getting an error 10 when it starts my backup routine Reply with quote

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
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Wed Nov 03, 2004 8:41 am    Post subject: Reply with quote

Do you also get a line number when the errormessage is shown?
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Wed Nov 03, 2004 9:16 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Wed Nov 03, 2004 11:17 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
xearo
Newbie


Joined: 01 Oct 2004
Posts: 18

PostPosted: Wed Nov 03, 2004 11:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
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

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group