Quantcast

Jump to content

» «
Photo

Any way to fill an array like this?

2 replies to this topic
nyolc8
  • nyolc8

    -

  • Members
  • Joined: 12 Oct 2009
  • Hungary

#1

Posted 29 July 2014 - 02:57 PM Edited by nyolc8, 29 July 2014 - 02:59 PM.

I have a problem/question, I have a script and I want to built an exclusion feature to it. I have an ini file, and I want to make a key in it, for example "Exclude=" and I want to be able to fill it in the ini file with vehicle model IDs like this: 

[Exclude Section]
Exclude = 518,483,486,......

My thought was I make an array called "exclude" with integers from this "Exclude" key elements and then I can work with them by:

98@ = i$exclude[0] //486
99@ = i$exclude[1] //483

or something like this. Is this possible in CLEO? I don't have exact script yet because I'm just wondering what are the possibilities to fill an array like this. :rol:


Shmoopy
  • Shmoopy

    Thug (͡ ͜ʖ ͡)

  • Members
  • Joined: 16 Jun 2009
  • None

#2

Posted 29 July 2014 - 03:50 PM Edited by Manfred Von Karma, 29 July 2014 - 03:50 PM.

0AD3: string_format [email protected] format "%d,%d,%d" 518 483 486
0AF5: write_string_to_ini_file [email protected] path "cleo\yourfilename.ini" section "Exclude Section" key "Exclude"
Not tested

fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • None
  • Contribution Award [Mods]

#3

Posted 29 July 2014 - 05:37 PM Edited by fastman92, 29 July 2014 - 05:37 PM.

Possible, but ',' scanning comma separated input will be a hard for beginner.

I won't post the implementation of this script, but someone else who has more time might do it.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users