A confusing problem in my new game

there is a really stupid problem out there i ve put some counter that when
any player of the 2 players scored at 1st he counts his score only & when the other one score after while the engine doesn’t count it 2 the 2nd player so stupid…!i found out something that the compiler write the score 2 the 2nd player
but in the shape of ones example: if i scored 6 points the compiler writes 111111 instead of 6 help…!
:cubs:
any way i dragged the file & if any one noticed some thing please let me know
<!-- / message --><!-- attachments -->

if i scored 6 points the compiler writes 111111 instead of 6 help…!

You’re adding it as a string instead of an integer …

quick solution is to multiply the string by 1, or adding 0, then add the next string (do this again).

or, when setting up the score, define it live: var score_1p = 0;
and then when adding to the score, use: score++;
and when subtracting: score–;

hey guys i tried doing all the strings & multipling stuff before but it didn’t work i didn’t think it 's about define a variable or putting ++ cause it work some times
so please guys try 2 upload the fla & c exactly what’s wrong!!! & thanks any way

in fact nothing is wrong, your textfields are a couple of frames ahead the main stuff,
so it would work if you declare the vars on first frame,

//on frame 1
var mscore, ascore

i tested this and it seems to work

hey tofuisonmyside thank u 2 much finally it worked, it was almost getting me crazy
thank u pal…