flsg -> RE: Flash Q&A thread 3 (6/13/2007 18:08:47)
|
quote:
ORIGINAL: chubbs123 i want help :D, well anyways im having a leveling problem.... c the thing is that, well ive never been the BEST coder, but anyways i have a battle system and after you "win" you get enough XP ATM too level up, well after you do u have too go back too town and when you do you have the option of "Battle Now" and when you do it sends you back too the frame where you first battled and well you lose your level, XP, stats, Etc. well anyways i bet its a simple fix but i just dont know :P anyways this is the AS on the frame, try too ignore some of the functions and other things that could be better :P many people have this problem before, now I'll show you one of the ways to fix this: in the battle frame, add this: if(myEXP==underfined){ var myEXP:Number=0 } if(myGold==....................//same thing here this code check if you already defined the variables, if you did, then it does nothing, if you didn't,which means it's the first time, then it create the variable
|
|
|
|