View Single Post
Old 06-25-2019, 04:07 PM   #18
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,799
Default

Hi,


Is it possible to parse CSV file like


Code:
36 Kick
37 Snare
etc...


so that the first number become index of an array containing the string as value ?


I tried a lot of things including,



Code:
map = 100;

//Load map
mapFile != slider30 | 0 || reload == 1 ?
(
  reload = 0;
  mapSize = 0;
  mapFile = slider30;
  fileHandle = file_open(slider30);
  fileHandle > 0 && file_text(fileHandle) ?
  (
    while
    (
      file_string(fileHandle, str);
      match("%d %s", str, d, #s);
      map[d] = #s;
      file_avail(fileHandle) ? mapSize += 1;
    );
    file_close(fileHandle);
  );

);

Without success :S
X-Raym is offline   Reply With Quote