Mmmmm. You use a Single int if I'm not wrong the compiler translate this to an Uint32.
My advice, use reserved words from the compiler like Uint32,16,8 etc.
P1, P2, Attackfinished, blabla are statics? 'cause aren't definied inside the function?
At line 16 you are missing a semicolon ...