Exit script function

codingmasters
30 Oct 2003, 18:59
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
30 Oct 2003, 19:07
End Define

codingmasters
30 Oct 2003, 19:29
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
31 Oct 2003, 02:43
dude, this isnt like VB....

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

thats all it is

codingmasters
31 Oct 2003, 05:40
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
31 Oct 2003, 07:43
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
31 Oct 2003, 08:29
Ok, Thanks, but I don't havethe time right now, I'll do it later

Matthew G.

GameBoy
31 Oct 2003, 10:13
....why dont you tell us all your life story, maybe we can help you with that too

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

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

Matthew G.

codingmasters
01 Nov 2003, 06:26
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
03 Nov 2003, 15:50
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
03 Nov 2003, 21:32
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
03 Nov 2003, 21:34
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
03 Nov 2003, 21:46
No excuse for sloppy programming!

codingmasters
03 Nov 2003, 21:47
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
03 Nov 2003, 21:53
Easy <> sloppy programming.

codingmasters
03 Nov 2003, 21:55
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
03 Nov 2003, 21:59
You just said it's sloppy at the moment and it isn't.

codingmasters
03 Nov 2003, 22:00
I didn't say it was sloppy. You did

paul_one
03 Nov 2003, 22:03
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
03 Nov 2003, 22:05
I looked back quickly just now. I guess I said that. Sorry.

Matthew G.

paul_one
03 Nov 2003, 22:07
hehehe - I just like it when people contradict themselves.

GameBoy
03 Nov 2003, 23:09
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