[PLUGIN] CSV, CSV2Array, CSV2Dictionary

Post your completed addons to share with the community

Post » Thu Jul 14, 2016 2:00 pm

I don't know man, I realy love this one but I think I'm just too dumb to use it properly. I have a textbox so, if you type in your name, press enter, and this name is already in the row "name" it will trigger true/ else: false (so far so good) but, I would also like to display (on a txt-object) in whitch col this name is lodged. Somehow I just can't get it right.
B
14
S
7
G
5
Posts: 31
Reputation: 3,976

Post » Sat Jul 16, 2016 5:25 am

@Mario4President

Sorry I did not get "whitch col this name is lodged". Do you want to get an number or ?
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Sat Jul 16, 2016 5:29 am

Update

rex_csv plugin:
Sort column or row
Sample capx
Call "Action:Sort items in col" or "Action:Sort items in row" will sort table by values in a column or row.
Uses rex_taffydb plugin to sort table with multiple columns.
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Sat Jul 16, 2016 10:41 pm

@rexrainbow oops, yeah I expressed myself very poor plus my misspelling (whitch -> which) was not helpful neither. I was trying to find out, how to get the "coordinates" of a value which is stored somewhere in the array. For ex.:
,s1,s2,s3
name, tom,jim,john

And if I type in "jim" a text-object will let me know where jim is stored, like: "(1,2)" or something
I'm trying to achieve some kind of a search system.
B
14
S
7
G
5
Posts: 31
Reputation: 3,976

Post » Sun Jul 17, 2016 9:17 am

@Mario4President

If you really want to get row and column name from the value of cell, you might need to retrieve all cells by these conditions
+ "Condition:For each col",
+ "Condition:For each row in col"

rex_CSV plugin is designed to get a cell value by ( column name , row name ).
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Sun Jul 17, 2016 8:34 pm

@rexrainbow
thank you I solved it. Actually it was really simple. The txt-object always displayed me the total number of rows, when I used the For each condition. But only because, I did not tell him when to stop so I added (to the condition for each loop) - data in col:name = "jim" and it worked fine! Because the for each condition had to stop at the moment it "found" the name "jim"
pretty simple and logic actually!
B
14
S
7
G
5
Posts: 31
Reputation: 3,976

Post » Wed Jul 20, 2016 6:27 pm

@rexrainbow
I wanted to say thank you so much for all your awesome plugins and behaviors you created for CS2! They have saved my life.
In terms of the CSV for arrays plugin you created, i believe to have discovered a bug in which certain elements are not getting read into the CS2 array properly.
I found, that if you have multiple .csv files that are being phased into a CS2 array into different z locations using your plugin, some data is shaved off based on the smallest excel doc (not all my excel .csv docs contain the same number of x values)
What would you suggest i do to insure all the data is correcting inputted into the array from the various excel docs.

Example of my problem:

doc1.csv (10 x elements)
doc2.csv (4 x elements)
doc3.csv (20 x elements)

When phased into the array, only 4 elements of doc1.csv are retained. The full amount (20) elements are in fact retained from the last document.
B
21
S
4
G
1
Posts: 13
Reputation: 2,055

Post » Thu Jul 21, 2016 5:52 am

@Salvo776

Do you use CSV2Array plugin in that case? You might put 3 arrays for each csv if the array size is not the same.
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Thu Jul 21, 2016 3:48 pm

@rexrainbow
Yes I did. The game was set up to read data from only one array. So, I suppose a workaround to this error would be to fill up each CSV file with equal elements, even though some of them may be filled with just zeros.
B
21
S
4
G
1
Posts: 13
Reputation: 2,055

Post » Wed Sep 07, 2016 7:44 pm

@rexrainbow

Hi. Thanks for the great plugin!
I'd like to know if there are another way to use a different separator to determine the cells. I need this because I'm using comma in my texts.
B
44
S
18
G
2
Posts: 574
Reputation: 5,429

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests