Code generator. Lil help here

Hey sorry to bother the forum but i just have a snall (hopefully) problem. I am designing a game and i made the code but i have to put it onto like 330 objects. Now i cant copy and pace because each one i have to change a small number in each one to make each one unique.
now i attempted making a code generator but AS wont take it. take a look