[PLUGIN] CSV, CSV2Array, CSV2Dictionary

Post your completed addons to share with the community

Post » Thu Apr 12, 2012 2:56 pm

Ok i try Hash table, i need a "loop for each col" for my JSON string but i think find a idea, i add a "index" with my "JSON table" for loop on. Thank's you for your response. :)
B
2
Posts: 3
Reputation: 256

Post » Fri Apr 13, 2012 12:52 am

Update:

Fix bug when transfer JSON string into table.


Thank you for finding this bug, @PeaceCopathe. Please download plugin again, it could work on your test capx.


Note: this fix might cause incompatible with older JSON load action. Please let me know if you have problem.

rexrainbow2012-04-13 01:54:50
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Fri Apr 13, 2012 4:53 pm

it works ! :)

You have changed the JSON string to CSV.TableToString if i understand ?

you added "key" and "item" for index row and col ?

thank's you for fix :)
B
2
Posts: 3
Reputation: 256

Post » Fri Apr 13, 2012 10:45 pm

@PeaceCopathe

Yes, so that I can recover these information.

But JSON string saved at older version still could not get these information. Sorry.rexrainbow2012-04-13 22:51:25
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Fri Apr 27, 2012 3:11 pm

Thanks a lot , that's exactly what I want.
I have a question with: it this plugin can be used when we make a offline game?
Just to confirm...
Thanks again
B
11
S
1
Posts: 53
Reputation: 1,087

Post » Fri Apr 27, 2012 11:44 pm

@nothing1969

Yes. The source of CSV is a string, you can use AJAX to load this string.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Wed May 02, 2012 3:31 pm

Hm...
But how exactly can i load data from the external file?
B
12
S
5
G
3
Posts: 14
Reputation: 3,322

Post » Wed May 02, 2012 3:38 pm

@raptor0723

AJAX
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Sun May 06, 2012 3:20 am

I read through all pages, and I couldn't find any reference, if I've repeated a previous question apologies!

So - I was thinking I could use this to create 3d array (row,column,page) , with the x/y storing a number/string to reference a particular tile, and the page to reference the level loaded.

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?
JohnnySix2012-05-06 03:22:01
Image
B
27
S
9
G
5
Posts: 487
Reputation: 11,939

Post » Sun May 06, 2012 4:03 am

@JohnnySix

You got it, rows/columns only accepted string. So you might use str(num) to transfer integer index to string index.

BTW, TMX importer might be a better choice to create a tile map.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 5 guests