Exit script function
codingmasters
30 Oct 2003, 18:59In 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.
Matthew G.
GameBoy
30 Oct 2003, 19:07End Define
codingmasters
30 Oct 2003, 19:291. 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.
2. I want a statement that will end the currrent script mid-way
Matthew G.
GameBoy
31 Oct 2003, 02:43dude, this isnt like VB....
define variable <m>
type numeric
value <0>
display <Magic: !>
end define
thats all it is
define variable <m>
type numeric
value <0>
display <Magic: !>
end define
thats all it is
codingmasters
31 Oct 2003, 05:40Ok 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 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:43ok, 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:29Ok, Thanks, but I don't havethe time right now, I'll do it later
Matthew G.
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
<-- say hello to Mr. Green
codingmasters
01 Nov 2003, 03:18For your information, my life doesn't need help. And for the record, it's probably been more interesting then yours.
Matthew G.
Matthew G.
codingmasters
01 Nov 2003, 06:26here'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.
Matthew G.
GameBoy
03 Nov 2003, 15:50codingmasters 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
paul_one
03 Nov 2003, 21:32CM - 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.
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:34You might not, but that will take up lots of extra time, and space. It would make it a whole lot easier
Matthew G.
Matthew G.
paul_one
03 Nov 2003, 21:46No excuse for sloppy programming!
codingmasters
03 Nov 2003, 21:47The 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.
Matthew G.
paul_one
03 Nov 2003, 21:53Easy <> sloppy programming.
codingmasters
03 Nov 2003, 21:55I 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
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:59You just said it's sloppy at the moment and it isn't.
codingmasters
03 Nov 2003, 22:00I didn't say it was sloppy. You did
paul_one
03 Nov 2003, 22:03Posted: Mon 03 Nov, 2003 9:47 pm
You didn't say theat then. . . Sheesh!
The way you have to do it now is sloppy programming
You didn't say theat then. . . Sheesh!
codingmasters
03 Nov 2003, 22:05I looked back quickly just now. I guess I said that. Sorry.
Matthew G.
Matthew G.
paul_one
03 Nov 2003, 22:07hehehe - I just like it when people contradict themselves.
GameBoy
03 Nov 2003, 23:09LMFAO!!! 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