User Tag List

Results 1 to 2 of 2

Thread: Loading an array by string

  1. #1
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,132
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)

    Loading an array by string

    I'm trying to load an array at start of frame (which is all the level data) I can load the map with no problems if I do for example:

    Apppath$ + "data/maps/map0001.arr"

    however... what I'd like is to load the maps from this path more dynamically, so I want to load it from a Global String

    So essentially:

    Apppath$ + "data/maps/GlobalStringA"

    The global string in the previous frame is set to the file name, so GlobalStringA would be "map0001.arr" or "map0002.arr" etc. --- so in theory... my map should load because the array should be looking for Apppath$ + "data/maps/map0001.arr" to load, but it doesn't work... any ideas?

    Edit: this is so typical, the minute after I post a question I figure it out, this was the solution -- Apppath$ + "data/maps/" + GlobalStringA + ".arr"

  2. #2
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    679
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    do this:

    Apppath$ + "data/maps/"+GlobalStringA

    Global values/strings, functions etc won't be registered as what they are when inside of quotation marks. You need to add manually outside of them, or fusion thinks you're just making a string called "data/maps/GlobalStringA" instead of retrieving your file.

Similar Threads

  1. Loading an object from array when needed (loading an array in chunks)
    By fishrod in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 20th March 2014, 06:01 PM
  2. Loading an Array
    By King_Cool in forum SWF/Flash Export Module Version 2.0
    Replies: 3
    Last Post: 4th December 2012, 07:10 AM
  3. Exception loading Array
    By K1kk0z90 in forum iOS Export Module Version 2.0
    Replies: 2
    Last Post: 21st February 2012, 09:30 AM
  4. loading cnc array in c++ HELP??
    By firecraker180 in forum Extension Development
    Replies: 7
    Last Post: 13th November 2006, 08:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •