Exit script function

codingmasters
In VB there is the Exit Sub statement, which will end the sub, meaning the rest of the sub will not run. How can I get this in Quest?

Matthew G.

GameBoy
End Define

codingmasters
1. I don't hand code my ASL files yet, although by going through these forums I know what you mean

2. I want a statement that will end the currrent script mid-way

Matthew G.

GameBoy
dude, this isnt like VB....

define variable <m>
type numeric
value <0>
display <Magic: !>
end define

thats all it is

codingmasters
Ok then, to make you fully understand it, I'll give you an instance:

I have to If/Then statements in one script, one after the other. In the first If/Then statement, inside the Else script, I might not want it to continue to the next If/Then statement, so I want an Exit Script type command, like you would find in VB

That good enough for you?

Matthew G.

I think Im Dead
ok, it'd be really easy to tell you exactly what you want if you could paste an example of what you are trying to do, inside some
 tags of course. I'll guess at what you mean though and toss out some sort of answer.

What you seem to be talking about is a scenario in which, IF(#1) "a dog" is "hot" THEN(#1) IF(#2) "there is some water" THEN(#2) "go drink some water" and if not you want it to do nothing.

This can easily be accomplished by using nested If/Then statements, ie; one lying inside of eachother, and to accomplish the do nothing aspect of the code, simply do not include an Else aspect to the script. If this wasn't what you were describing leave a comment, and it would help some source code, and I'll help you figure it out.

codingmasters
Ok, Thanks, but I don't havethe time right now, I'll do it later

Matthew G.

GameBoy
....why dont you tell us all your life story, maybe we can help you with that too

:mrgreen: <-- say hello to Mr. Green

codingmasters
For your information, my life doesn't need help. And for the record, it's probably been more interesting then yours.

Matthew G.

codingmasters
here's my example, 'cept it's not by me: http://www.axeuk.com/phpBB2/viewtopic.php?p=1001#1001. read the whole thread to understand what I mean.

Matthew G.

GameBoy
codingmasters wrote:For your information, my life doesn't need help. And for the record, it's probably been more interesting then yours.

Matthew G.


i agree, i could make a soap out of your life :D

paul_one
CM - if you code it properly you don't need an exit sub.

Although it does help occasionally - and in some instances it IS needed (although that is in VB - not ASL). Still, almost 99.999% of the time you're just coding it wrong - especially if it's an "if" statement.

codingmasters
You might not, but that will take up lots of extra time, and space. It would make it a whole lot easier

Matthew G.

paul_one
No excuse for sloppy programming!

codingmasters
The way you have to do it now is sloppy programming. Face it. Withan exit script function, it would make it a whole lot easier.

Matthew G.

paul_one
Easy <> sloppy programming.

codingmasters
I knew that

Stop pointing those sorts of things out to me

Matthew G.

PS Don't start with me. If you think you don't read back in the threads

paul_one
You just said it's sloppy at the moment and it isn't.

codingmasters
I didn't say it was sloppy. You did

paul_one
Posted: Mon 03 Nov, 2003 9:47 pm

The way you have to do it now is sloppy programming



You didn't say theat then. . . Sheesh!

codingmasters
I looked back quickly just now. I guess I said that. Sorry.

Matthew G.

paul_one
hehehe - I just like it when people contradict themselves.

GameBoy
LMFAO!!! i kinda like this, im finding CMs' presense here rather amusing. its kinda like the time u all ganged up against me! lol, but that was for another, completely different reason. this is just insanely funny

This topic is now closed. Topics are closed after 60 days of inactivity.