-
How can I add a Number to a string? Like as in 2+1=3 not as in 2+1=21
I am making it so that after someone crosses a frame each time it adds a number and when it gets to 8 it does some other action. Would it be something like this? 'tracksplayed= +1;' Thanx in advance.
-
You need to convert the string into a number by using
number = parseInt(myString) + 10
for example.
To increment a variable, you can use one of these:
variable++
variable += 1 (or any number, in fact)
variable = variable + 1
Hope this helps!..
Arctic
-
The variable would be in my case "tracksplayed" right?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|