A Few Ideas

I think Im Dead
I've been noticing that something quest doesn't easily(or directly support) is entering multiple variables from the command line. An example of this would be a command for perhaps painting; 'PAINT SIGN BLUE'(with sign and blue both being string variables). As far as I know, Quest doesn't really have a way to tell the compiler when one string variable ends and another begins. I was thinking perhaps it would be convenient to implement some syntax for command lines that lets Quest know, the characters up until a space are the variable to be entered. I guess perhaps something like this...

command <paint #object-variable#_#color-variable#>


Or something similar to allow multiple variables to be entered instead of having to right a script to check for a space in each line and split the remaining text from each side into variables.

Um, my other idea, I've spaced out right now, but I'll come back in a bit and toss it in.

paul_one
It does work ITID...
Check: http://www.roxor.freeserve.co.uk/CommandTest.asl
It works in 3.5 b2 ... And I've had similar stuff in lower versions than 3.0

It checks for the space so it seems, so if an object had a space in there than it would be moved over... Bad at explaining so here you go:
Command <paint #object# #colour#>
Entered: "paint sign blue"
Variables: object = "sign"; colour = "blue"

Entered: "paint tall sign blue"
Variables: object = "tall"; colour = "sign blue"

... You'd need to have something like you're afore mentioned _ or / or something to seperate the two properly. All you need to do is change the space to a _ or / or whatever...

Que my second example: http://www.roxor.freeserve.co.uk/CommandTest2.asl

I'll wait eagerly for your next post!

GameBoy
interesting technique C.W. thanks for that

I think Im Dead
My point was that quest doesn't have a syntax to tell the compiler, "Hey if there's a space in this line, then the second part is a different variable."
And a piece of syntax that could let us do that easier might be nice, I guess it is just as easy to make a code that will test the lines for such cases.

paul_one
I kinda get what you mean - but surely, isn't the syntax for a space - infact a space?
What good will changing it from a space to something else do?

codingmasters
It wouldn't do anything except cause extra coding for Alex

Matthew G.

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

Support

Forums