Status Variable appearing within text
steve the gaming guy
26 Dec 2005, 16:34To whomever can help me,
At the end of my game, I wanted to present a line of text that says "You had a final score of 200 out of 200 and I thank you for playing."
The code I tried is as follows:
It almost works but instead of producing what the status variable says, it just inserts a 0.
Any thoughts?
At the end of my game, I wanted to present a line of text that says "You had a final score of 200 out of 200 and I thank you for playing."
The code I tried is as follows:
You had a final score of $ubound(Score)$ and I thank you for playing.
It almost works but instead of producing what the status variable says, it just inserts a 0.
Any thoughts?
Alex
26 Dec 2005, 23:08Why are you using the ubound function - surely you just want to display the contents of the variable, e.g. %score% or #score# ...?
steve the gaming guy
27 Dec 2005, 17:23I guess I was thinking too far into it and made it more difficult. I know I've seen ubound used before.
I'll have to wait until I get home but I was thinking that %score% #score# would produce just the number of the variable as opposed to the whole sentence. I was onto something like that after I posted my question but I will work more on it when I get off work!
...and don't call me Shirley!
I'll have to wait until I get home but I was thinking that %score% #score# would produce just the number of the variable as opposed to the whole sentence. I was onto something like that after I posted my question but I will work more on it when I get off work!

...and don't call me Shirley!

paul_one
28 Dec 2005, 16:38Alright Mary - let's take a lookey eh?
$ubound()$ is used on arrays. It is to see how BIG the array is.
What you want is more like:
%score% / %possible%.
Which is fine is a msg <> tag.
$ubound()$ is used on arrays. It is to see how BIG the array is.
What you want is more like:
%score% / %possible%.
Which is fine is a msg <> tag.
GameBoy
29 Dec 2005, 06:41or just...
%score% being your score, and %topscore% being the max you could achieve.
You had a final score of %score% out of %topscore% and I thank you for playing.
%score% being your score, and %topscore% being the max you could achieve.
steve the gaming guy
04 Jan 2006, 17:30What I ended up doing that worked for me is first setting the Score numeric variable to %score1% by coding it somewhat like:
I don't know exactly what the code looks like. I'm at work right now.
and the last code looks like:
Since the total score never changes, there's no reason to put another variable.
set %score% to %score1%
I don't know exactly what the code looks like. I'm at work right now.
and the last code looks like:
You have a final score of %score1% out of 260
Since the total score never changes, there's no reason to put another variable.