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 


command or fuction nested to deeply error help :(

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


Joined: 01 Aug 2002
Posts: 790

PostPosted: Wed Mar 03, 2004 7:00 am    Post subject: command or fuction nested to deeply error help :( Reply with quote

hello all

i get this "command or fuction nested to deeply error" i have tried it diff ways and i still get this error Sad

any ideas how to fix it?

thanks

Code:

:EVLOOP
    WAIT EVENT,.01
  goto @event()
  :timer
  %%TaskName = @taskkiller(iexplore.exe)
:Taskkiller
    list create,29
    list tasklist,29,|NI
    if @match(29,|%1|)
      parse ";%%TaskName",@item(29)
      killtask %%TaskName
      list close,29
      list create,29
      list tasklist,29,|NI
      if @match(29,|%1|)
        list close,29
        exit
        else
          list close,29
          exit KILLED
        end
        else
          list close,29
                end
               goto evloop

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Wed Mar 03, 2004 9:26 am    Post subject: Reply with quote

How about adding a REPEAT UNTIL loop ?
_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


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

PostPosted: Wed Mar 03, 2004 9:28 am    Post subject: Reply with quote

You get the error because you call the :Taskkiller label with the @taskkiller() function, but after that, the code will just continue to execute the function again, after which it will go to the Evloop again. You can solve it like this:

Code:
:EVLOOP
    WAIT EVENT,.01
  goto @event()
  :timer
  %%TaskName = @taskkiller(iexplore.exe)
  goto evloop

:Taskkiller
    list create,29
    list tasklist,29,|NI
    if @match(29,|%1|)
      parse ";%%TaskName",@item(29)
      killtask %%TaskName
      list close,29
      list create,29
      list tasklist,29,|NI
      if @match(29,|%1|)
        list close,29
        exit
        else
          list close,29
          exit KILLED
        end
        else
          list close,29
                end
               exit

_________________
[ 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
arcray
Valued Contributor
Valued Contributor


Joined: 13 Jul 2001
Posts: 242
Location: Aude, France

PostPosted: Wed Mar 03, 2004 11:03 am    Post subject: Reply with quote

I always try to avoid EXITs and GOTOs from within IF,ELSE,END statements as Error 10s can get raised very quickly. I tend to use something like this to avoid them:-

Code:

   IF @ASK(In any case it is advisable to shut down. OK?)
     %%ENDIF = CLOSE
   ELSE
     %%ENDIF = EvLoop
   END
   GOTO %%ENDIF


_________________
Andrew GRAY
If you don't know I am looking for work, I won't get the job.

andrewrcgray.com
Back to top
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Wed Mar 03, 2004 11:44 pm    Post subject: Reply with quote

thanks guys

Skit3000 - that code seems to work Smile


arcray - i think i follow what you mean BUT i'am not sure how to added it to the coded i posted


thanks again

_________________
Have a nice day Smile
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