[PLUGIN] CSV, CSV2Array, CSV2Dictionary

From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • Using this latest version of the plugin with C3 the data on the x is always offset by one. So if I try to get data from x1/y1 it gives me data from x2/y1. This is the name if I grab the CSV numerically or using a string of the column name.

    More worrying is that if I return RowCount or Column count the data gets completely lost for some reason and I am forced top load it all in again. This makes no sense.

  • rexrainbow

    I assume the CSV plugin is no longer supported? Eren converted it to be used with C3 (which was great btw).

    but I keep coming across a 'bug' in it that I was wondering could/would it ever be fixed?

    Basically the bug is that the CSV.CurRow variable is not protected in scope. So if you loop through the rows of an CSV and inside that loop if you call a function that also loops through the same CSV it blows away the CSV.CurRow for the outer loop.

    There are of course work-arounds but I was just wondering if I should file a bug report or is it even possible to fix/is it even supported?

    I hate that I used this plugin everywhere, but honestly I haven't seen a better way to easily reference a DB or CSV in this case. Being able to use the field names is pretty great. i.e. CSV.At("name",CSV.CurRow) etc..

    Nepeo would you happen to know?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Please provide a very simple test c3p file to reproduce your issue, thanks.

  • rexrainbow

    I assume the CSV plugin is no longer supported? Eren converted it to be used with C3 (which was great btw).

    but I keep coming across a 'bug' in it that I was wondering could/would it ever be fixed?

    Basically the bug is that the CSV.CurRow variable is not protected in scope. So if you loop through the rows of an CSV and inside that loop if you call a function that also loops through the same CSV it blows away the CSV.CurRow for the outer loop.

    There are of course work-arounds but I was just wondering if I should file a bug report or is it even possible to fix/is it even supported?

    I hate that I used this plugin everywhere, but honestly I haven't seen a better way to easily reference a DB or CSV in this case. Being able to use the field names is pretty great. i.e. CSV.At("name",CSV.CurRow) etc..

    Nepeo would you happen to know?

    Yeah I expect the plugin just has a single variable for tracking that information, so if you use it in a nested way the inner one overrides the value. Then depending on how that was implemented it would break the parent call. It needs to use a stack, or similar technique to restore the state after the inner one completes. I remember writing similar protections into the JSON plugin.

    I can't really help a huge amount more here to be honest... I haven't had time to pop into the C3 community for quite some time to be honest ( as people have likely noticed ). I know enough to produce a plugin for this but I wouldn't have time to maintain it.

  • Can someone please provide a simple c3p showing how to use Rex's csv to array plugin? I'd like a programmatic way to load a .csv into an array, vs what I currently do (copy and paste excel data into the C3 array editor.

    Thanks!

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