function return value not working
FlyinBryan
28 Jun 2014, 17:57Hey all! I'm not a strong programmer, I get it to a certain extent but have always wanted to get back in to programming adventure games and Quest is just outstanding! That aside...
I am trying to get example of Creating functions which return a value working, and it's not. I've double checked all the coding, spaces, etc etc and yes rechecked them. When I run the game I get the following error.
> test
Error running script: Error compiling expression 'number1 + number 2': Unknown object or variable 'number 2'
1 + 2 = 0
Help!?!
Thanks!!
I am trying to get example of Creating functions which return a value working, and it's not. I've double checked all the coding, spaces, etc etc and yes rechecked them. When I run the game I get the following error.
> test
Error running script: Error compiling expression 'number1 + number 2': Unknown object or variable 'number 2'
1 + 2 = 0
Help!?!

Thanks!!

jaynabonne
28 Jun 2014, 18:03It looks like you have a space in "number 2". Since the other is "number1", I'm guessing it should be "number2" without the space.
Quest has the interesting quirk that variables and other names can have spaces in them. So it sees "number 2" as being a variable but distinct from "number2".
(Also, this part of the forums is for "Site Announcement and Feedback". You'll get a better response if you post questions like this under the "Quest Forum" forum.)
Quest has the interesting quirk that variables and other names can have spaces in them. So it sees "number 2" as being a variable but distinct from "number2".
(Also, this part of the forums is for "Site Announcement and Feedback". You'll get a better response if you post questions like this under the "Quest Forum" forum.)
FlyinBryan
28 Jun 2014, 20:06Right on thank you!! just one little space throws off everything!!
Thanks again!
Thanks again!