Asked
— Edited

I am writing a script for playing a game with my robot. I am stumped on what to put in the script to keep score. How would i do that? Thanks
I am writing a script for playing a game with my robot. I am stumped on what to put in the script to keep score. How would i do that? Thanks
InMoov cheats! Here's what I have at the beginning of my script to set the variables;
it's adding up correctly but saying the wrong thing.
On this one InMoov announced he won.
Every time you use the script
You are effectively only adding a 1 to the end of the string. "Human = 0" + 1 is "Human = 01".
It is saying the correct thing for what you are asking to to say. What you are asking for is not the same as what you want.
Your variables for the scoring aren't decimal they are strings. The lines of code should be;
These are decimal and you will be able to use math with them. You cannot use math with strings.
With these lines of code $human + 1 would be 1, then 2, then 3 as the variable is a number not a string.
oops sorry Bob... Rich is right, I made a mistake...
before your game set your variables like this... then start the game...
Thank you both for all your help with this.