CLEO Help 0AF4 opcode variable

CLEO related
Status
Not open for further replies.

Valiuks

Active member
Joined
Sep 9, 2018
Messages
25
Reaction score
4
hi original opcode is

0AF4: 0@v = read_string_from_ini_file "cleo\config.ini" section "SectionName" key "stringKey"

but i need something to look like this

0AF4: 0@v = read_string_from_ini_file "cleo\config.ini" section "SectionName" key 1@

and it doesn't work. my question is it possible to make this opcode that key into variable or not?

yeah and my 1@ is going to be integer so overtime in a loop i will add 1@ + 1
 

Edvincik

Well-known member
Joined
Mar 15, 2016
Messages
399
Reaction score
26
Valiuks said:
hi original opcode is

0AF4: 0@v = read_string_from_ini_file "cleo\config.ini" section "SectionName" key "stringKey"

but i need something to look like this

0AF4: 0@v = read_string_from_ini_file "cleo\config.ini" section "SectionName" key 1@

and it doesn't work. my question is it possible to make this opcode that key into variable or not?

yeah and my 1@ is going to be integer so overtime in a loop i will add 1@ + 1

You didn't understand this opcode correctly. If you put this line: 0AF4: 0@v = read_string_from_ini_file "cleo\config.ini" section "SectionName" key "stringKey", then 0@v will be that value that you get from .ini. But for numbers i recommend you to use: 0AF0: 0@ = get_int_from_ini_file "cleo\config.ini" section "SectionName" key "intKey", then 0@ will contain value from .ini and in loop you will have to put 0@ += 1
 

Valiuks

Active member
Joined
Sep 9, 2018
Messages
25
Reaction score
4
ty for reply but the value i need to get is string. i will have ini file containing ex:

[Test]
1=Name1
2=Name2
3=Name3
and so on, until like 100

so for 1@ will be 1 and it will get me name1 and everything in ini file in that loop. if its not possible you got suggestions hoe to do it then?
 
Joined
Dec 31, 2015
Messages
712
Reaction score
27
https://blast.hk/wiki/opcodes:0c1c
alloc 2@ 16
0C1C: 2@ = itoa 1@ radix 10
then
0AF4: 0@v = read_string_from_ini_file "cleo\config.ini" section "SectionName" key 2@
free 2@

Sure will do the thing
 

Valiuks

Active member
Joined
Sep 9, 2018
Messages
25
Reaction score
4
supahdupahnubah said:
https://blast.hk/wiki/opcodes:0c1c
alloc 2@ 16
0C1C: 2@ = itoa 1@ radix 10
then
0AF4: 0@v = read_string_from_ini_file "cleo\config.ini" section "SectionName" key 2@
free 2@

Sure will do the thing

thank you! i will try it later but thats exactly what I needed. lock
 
Status
Not open for further replies.
Top