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 


What am I doing wrong here?

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


Joined: 08 Apr 2002
Posts: 15

PostPosted: Sun Apr 14, 2002 6:31 pm    Post subject: What am I doing wrong here? Reply with quote

OK, I have some code that looks like this:
Code:

   IF @ASK(You want to copy the %I version of %H from %G and export it to %L %K on %J?)
      IF @EQUAL(%J, Server)
       @ASK("Server" is selected as Destination. Are you sure you want to overwrite the server copy of %L %K??)
       LIST ADD, OutputWindow, Server update confirmed
       ELSE
       info Export Cancelled
       goto evloop
     ELSE
     LIST ADD, OutputWindow Server isn't destination
     gosub getmapfrom
     END
  ELSE
  info Export Cancelled
  goto evloop
END

What's wrong with it? I get 'Export Cancelled' no matter what the variables are set to. If %J equals Server it crashes with 'Invalid Command on the second @ASK. I'm guessing it's something to do with the usage of the second @ASK within the IF @EQUAL loop, but I can't figure it out.
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sun Apr 14, 2002 6:44 pm    Post subject: Reply with quote

__________________________________________________________________________________________________________________________
You left out an IF at the second @ask(). Try this:
Code:

IF @ASK(You want to copy the %I version of %H from %G and export it to %L %K on %J?)
   IF @EQUAL(%J, Server)
      IF @ASK("Server" is selected as Destination. Are you sure you want to overwrite the server copy of %L %K??)
         LIST ADD, OutputWindow, Server update confirmed
      ELSE
         info Export Cancelled
         goto evloop
      END
   ELSE
      LIST ADD, OutputWindow Server isn't destination
      gosub getmapfrom
   END
ELSE
   info Export Cancelled
   goto evloop
END

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
flypaper
Contributor
Contributor


Joined: 19 Oct 2001
Posts: 104

PostPosted: Mon Apr 15, 2002 2:26 pm    Post subject: Reply with quote

When I have problems like that I always step through the program one line at a time. Not sure if you used, or have noticed, that option. Just food for thought from another noobie.
Back to top
View user's profile Send private message
Seffyroff
Newbie


Joined: 08 Apr 2002
Posts: 15

PostPosted: Mon Apr 15, 2002 2:34 pm    Post subject: Reply with quote

Thanks guys!

That did the trick Mac!
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