The Daily Click ::. Forums ::. Klik Coding Help ::. Saving to Array from a Sub App
 

Post Reply  Post Oekaki 
 

Posted By Message

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
5th June, 2012 at 05/06/2012 15:22:09 -

Hi

(MMF2 HWA up to date build)

Im having a little trouble with saving numbers to an array from a sub app. Basically what im doing is i have a shop in the game that runs from a sub app, when you buy something it saves the fact that its been purchased to the save file array. It works and in the debugger i can see that the number has been assigned to the array, However when i then exit the Sub app back to the main game the array no longer holds the numbers assigned from inside the sub app.

The array is being correctly loaded after exiting the sub app in the main game, its as if the array inside the sub app is a different Array.....

I have no idea what the issue is. any help would be vastly appreciated!

Thanks

 
n/a

nivram



Registered
  20/07/2006
Points
  171
5th June, 2012 at 05/06/2012 16:56:03 -

Would you upload your mfa, or a stripped down mfa demonstrating the problem?

Thanks,

Marv

 
458 MMF2 & CTF 2.5 examples and games

http://www.castles-of-britain.com/mmf2examples.htm

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
5th June, 2012 at 05/06/2012 22:17:08 -

Hi marv, i will do. i have been told it has something to do with the SUB APP being Modal. would this sound about right


 
n/a

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
6th June, 2012 at 06/06/2012 16:47:17 -

Arrays are global between the frames of your main application but not between frames sourced through a SupApp object. The work around is to save your Array to an external file from within the SubApp and then load that file again from the main frame.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click