[PLUGIN] CSV, CSV2Array, CSV2Dictionary

  • Thanks but I already knew that. The problem starts when I try to set entry at a specific page, then it doesn't work.

  • megatronx

    "set entry at a specific page", do you mean that this entry does not exist at this target page? Or..?

  • using content from the file u made, if you would try to set an entry value on page P0 to CSV.At("a","c", "P0") & " + " & CSV.At("a","c", "P1") then as far as i can remember CSV.At("a","c", "P1") will always return 0 or stay empty, or it will turn the page to P1 and will try to set value over there.

    EDIT@ so maybe you could add PAGE to SET VALUE, so we would have the following: PAGE,COL,ROW,VALUE?

  • megatronx

    I see, I will add another action to set entry, which could assign the page name.

    Thanks for notification.

  • I thank you REX. Your plugin is absolutely incredible and it's best rpg creators friend! :)

  • Update:

    Add "Action:Set entry at page".

    megatronx

    Here it is.

  • WOW, you're fast! :D thanks a lot man. So now it will not switch the pages when I call AT()? This will help tremendously!

  • megatronx

    The "action: turn page" will be embedded at "Action:Set entry at page" since it need to assign a page name.

  • So it will work exactly the same as before but now i just wont have to turn the page before set entry action or will it first grab the values from the pages and then turn the page to the one specified in the Page value?

  • megatronx

    Yes, just embedded "turn page" in these action/expression.

    It will be better to assign page name at "expression:At" (3 or 4 parameters mode) and using "Action:Set entry at page" to assign page name clearly to avoid confused in multi-pages environment.

  • All right :) thanks. Will give it a try later today! :)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I read through all pages, and I couldn't find any reference, if I've repeated a previous question apologies!

    I just have one question though, can you look up rows/columns without using strings as headers for row/columns?

    I.E.

    CSV.At(1,2)

    rather than

    CSV.At("THIEF", "ATK")

    I did try, but I got an error saying it requires a string not an integer - so was wondering if there was a different action perhaps?

    I might be dumb but I have the same problem, how to get a specific cell without using headers, like in an array?

    I did try CSV.At("1", "1") but of course I get:

    [CSV] Expression:At - Can not find col index '1' in table.

    Because after sorting rows by col, you don't know which row will be first, I'd like to get just the first cell of second row after a sort. <img src="smileys/smiley12.gif" border="0" align="middle" />

  • If you need an index with this plugin you simply write it in. For instance, in my personal application of this I made my first column an index going from 1 to 30 starting at the second row. I could then pull data based off an integer requesting its index position followed by the 'type' of data, which is what my top row was filled with.

    EX.

       Fish   Water   Temp

    1 Bass   Fresh   76

    2 Marlin Salt    65

    3 Gar    Fresh   74

    So if i wanted to scroll through this data I'd make a variable like:

    Position = 1

    And then call based on that:

    On layout start

         Set text to Get CSV.At("Fish", position)

    Next Button clicked add 1 to position

         Set Text to Get CSV.At("Fish", position)

    Back Button clicked subtract 1 from position

         Set Text to Get CSV.At("Fish", position)

    You would now be scrolling through the data by an index! Hope this helps!

  • Thanks but what happens if you sort by temp first?

       Fish   Water   Temp

    2 Marlin Salt    65

    3 Gar    Fresh   74

    1 Bass   Fresh   76

    How do you get the Marlin line?

  • The only way I just found is:

    For each row

    i<=0

    And action add +1 to i so basically the loop is for one line, the first one.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)