User Tag List

Results 1 to 4 of 4

Thread: Using "get current line number" for array position?

  1. #1
    No Products Registered

    Join Date
    Sep 2015
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using "get current line number" for array position?

    I've been working on this project for a little while now and I'm worried I might need to rewrite a whole lot of my code to work with arrays.

    Basically what I'm trying to do is this: I have a log menu that I can record numbers and notes to in my app. It starts out with a default of three pages but extra pages can be added at any time. When you click on an area of the log it'll give you an edit box to work in and a "okay" button to save what you've input and that's where the array comes in. I'm tracking the pages of my log book using a list object and whatever page is currently selected in the list object is the page that is displayed. I want the information that is typed into the edit box to be saved in an XY array that corresponds to the current selected line in my list object.

    What I thought would work is this:

    (For a value)
    When user clicks on button
    >Set Alterable Value A to Val(Edittext$("editbox"))
    >Write Value Alterable Value A("editbox") to (1, List Select("list"))

    I have a counter set to always display what's being stored in the array at 1,1 (since both the list object and the array object are set 1-based index) but it seems that nothing is being written there. The only thing I can think that would be messing it up is the "list select("list")" expression. I have another counter set up that uses that same expression to display the current line number so I know the expression works.. it just won't work in my array for some reason.

    Anyone have any idea where I'm going wrong here?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    A simple error that often occurs:
    have you checked that you are using a "number array"?
    It won't write a val() if set to "text array".

    But I'm not exactly sure if I got what you're doing so I may be mis-targeting my answer

  3. #3
    No Products Registered

    Join Date
    Sep 2015
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Changing to a number array worked. I guess I was under the assumption that if I had a text array I could save both values and strings.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Chrille's Avatar
    Join Date
    Jul 2006
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can store values if you convert to/from a string when writing/reading. In the expression editor, use Str$( value ) when writing to- and Val ( array index) when reading from the array. If you're only going to use numbers I guess a numerical array would be better since they're faster.

Similar Threads

  1. Replies: 2
    Last Post: 28th April 2014, 01:59 PM
  2. Save text to ini in "iOs Multiple Line Object" more than one line!
    By iamjot in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 1st February 2012, 02:16 PM
  3. [BUG] - List object "Set Current line" action
    By Nico in forum Android Export Module Version 2.0
    Replies: 3
    Last Post: 10th September 2011, 12:01 PM
  4. frame "slides" to a position instead of "jumping"
    By pikzilla in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 9th March 2010, 12:43 AM
  5. Problems using "Restart the Current Frame"
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 18th June 2009, 11:38 PM

Tags for this Thread

Posting Permissions

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