[PLUGIN] CSV, CSV2Array, CSV2Dictionary

Post your completed addons to share with the community

Post » Thu Apr 16, 2015 11:07 pm

This is ridiculously awesome and easy to use, thanks!
B
4
Posts: 3
Reputation: 333

Post » Mon Jul 06, 2015 3:58 am

Here is a local database (taffydb) plugin which supports querying and sorting.
B
97
S
22
G
178
Posts: 4,120
Reputation: 104,047

Post » Tue Jul 14, 2015 7:50 pm

Hi rexrainbow! Amazing plugin!

Just a question: when I load a .csv file to an array, all strings that had a special character like â,ã,é and others like this had those characters changed to a "?" symbol in the array. In the .csv file, the characters are right, even in Project Imported Files of C2, but when they fill the array using your plugin, they change to "?". Is there any way to keep them as they are after loading them in the array? Anything I should write in the .csv file so the string is kept intact?

Anyway, thanks for the great plugin!

All the best to you!
B
8
S
1
G
1
Posts: 15
Reputation: 514

Post » Thu Jul 30, 2015 6:46 pm

@rexrainbow Since the last C2 update I seem to be having issues with loading a CSV sting to an array via AJAX. If I load the CSV raw into CSV2Array it works fine. I pull the file of my server it loads fine. But when I go to put that string as AJAX.LastData into CSV2Array it buggers out. I will load about 88%-100% and the game will freeze. If I disable the 'Fill Array form CSV string' action it will run fine.

I think this is either a bug or error on my part using LastData.

Start Of layout->Ajax Request URL DOMAIN&"/Data/PoliticalMapCSV.txt"; Load CSV2Array "LastData" Row to X and Column to Y;Set Board to 10x10; Fill Board Tiles with "MapTile"

For Each XY element in array & Pick Instance of "MapTile" = MapIndex-> Add 1 to MapIndex; Change Animation of "MapTile" = Array.CurValue;

You can dump LastData into CSV2Array without any additional formatting right?
"Were all mad here. I'm mad, your mad." "How do you know I'm mad?" Asked Alice. "You must be" Said the Cheshire Cat. "Or you wouldn't have come here"-Lewis Carroll: Adventures In Wonderland
B
6
S
2
Posts: 113
Reputation: 1,220

Post » Fri Jul 31, 2015 12:11 am

@LuciusCD

Sorry for missing this question.
The question might come from encoding of characters. Change the setting of editor might solve it ( but I do not know how to set it )
B
97
S
22
G
178
Posts: 4,120
Reputation: 104,047

Post » Fri Jul 31, 2015 12:17 am

@CrazyVulcan

I am not sure the whole procedure of your case. You might post a very simple capx file or a screen shot of events.
I guess that you had missing "condition:On completed" in Ajax object.
B
97
S
22
G
178
Posts: 4,120
Reputation: 104,047

Post » Fri Jul 31, 2015 12:55 am

rexrainbow wrote:@CrazyVulcan

I am not sure the whole procedure of your case. You might post a very simple capx file or a screen shot of events.
I guess that you had missing "condition:On completed" in Ajax object.


I managed a work around but it could vary well be error on my part. The missing OnCompleat step could be what was wrong.
"Were all mad here. I'm mad, your mad." "How do you know I'm mad?" Asked Alice. "You must be" Said the Cheshire Cat. "Or you wouldn't have come here"-Lewis Carroll: Adventures In Wonderland
B
6
S
2
Posts: 113
Reputation: 1,220

Post » Wed Oct 21, 2015 5:35 pm

I have same problem with the last version of c2.
i put the CSV on my array. I'm waiting for the ajax to complete his request. The CSV is in the array without problem Then when i loop
to put the sprite to the position in the array, some sprite doesn't appear and it seems to not recognize some sprite on the debug mode.

here's the link of the capx. Go debug mode and push A on keyboard. Look for battle_box newly spawn sprite. Some Shouldn't appear.
https://mega.nz/#!jct3mbwZ!JiA1YYRWIA30ipIR3rgSewetLTDCQua4hymjxf0hiwQ
B
8
S
1
Posts: 6
Reputation: 946

Post » Tue Jan 05, 2016 11:29 pm

Why csv is better than arrays? Only for the most easy edition? and the most important, it will not cause lag? I'm worried about it so I want to understand more...

Sorry for be a noob.
B
8
Posts: 34
Reputation: 512

Post » Wed Jan 06, 2016 2:45 am

@cmee

Official array is a 1d/2d/3d array indexed by number. My csv plugin is a 2d hash table indexed by string name.
The performance might be almost the same I guess. ( I had not tested )
B
97
S
22
G
178
Posts: 4,120
Reputation: 104,047

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: gamecorpstudio, matriax and 1 guest