Hello,
I'm using a string based score in my game "Cannon Defense" and the result is:

Should I change to int type?
A fast, easy to use, free, and community supported 2D game engine
Hello,
I'm using a string based score in my game "Cannon Defense" and the result is:

Should I change to int type?
i thought scores had to be an int
Nope, CocosLive has the option for string, int and something else for the type of scores.
Riq, could you answer this? should I move to integer type score?
Hi Natan, it does let you use string, but i can't think a case where you would like that since it will order comparing each ascii character...
I assume you are ordering highest on top, so because in the first character 2 is higher than 1, it goes on top.
EDIT: Well unless you use some kind of grading for the score like in US exams (?) like A,B,C,D,E ;)
Hmm understood pablo, I will use integers for my game.
yes, I suggest using ints when possible.
You must log in to post.