| View previous topic :: View next topic |
| Author |
Message |
Seffyroff Newbie

Joined: 08 Apr 2002 Posts: 15
|
Posted: Sun Apr 14, 2002 6:31 pm Post subject: What am I doing wrong here? |
|
|
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 |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sun Apr 14, 2002 6:44 pm Post subject: |
|
|
__________________________________________________________________________________________________________________________
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 |
|
 |
flypaper Contributor


Joined: 19 Oct 2001 Posts: 104
|
Posted: Mon Apr 15, 2002 2:26 pm Post subject: |
|
|
| 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 |
|
 |
Seffyroff Newbie

Joined: 08 Apr 2002 Posts: 15
|
Posted: Mon Apr 15, 2002 2:34 pm Post subject: |
|
|
Thanks guys!
That did the trick Mac! |
|
| Back to top |
|
 |
|