Coding

 Reply to this postStart new topic

How to read write ini file with cleo

ATP
post Aug 12 2011, 05:53 PM
Post #1


GTA United Lead Developer

Posts: 52
From: Germany
Joined: 23-April 11



Hey,
I tried to read and write int values with this opcodes:
CODE
0AF0: 0@ = get_int_from_ini_file "cleo\config.ini" section "SectionName" key "intKey"
0AF1: write_int 16 to_ini_file "cleo\config.ini" section "SectionName" key "intKey"

But my game crahses. My test ini file looks like this:
CODE
[SectionName]
intKey=15

Is that right? Or is there another reason why my game crashes.

I need to write and read 2 int values from an ini, maybe there is another way than this opcodes?


--------------------
Go to the top of the page
 
+Quote Post
DK22
post Aug 12 2011, 06:42 PM
Post #2


Member

Posts: 197
From: Liberty City, Shoreside
Joined: 15-July 10



Must work.
Check if plugin "IniFiles.cleo" is in CLEO folder.
Or maybe you need to set register of letters to "as is", in SB options...
Go to the top of the page
 
+Quote Post
ATP
post Aug 12 2011, 06:56 PM
Post #3


GTA United Lead Developer

Posts: 52
From: Germany
Joined: 23-April 11



QUOTE (DK22 @ Aug 12 2011, 08:42 PM) *
Must work.
Check if plugin "IniFiles.cleo" is in CLEO folder.
Or maybe you need to set register of letters to "as is", in SB options...
Hey, the missing plugin was my error. I thought CLEO4 supports that opcode native.
Thx biggrin.gif

This post has been edited by ATP: Aug 12 2011, 06:56 PM


--------------------
Go to the top of the page
 
+Quote Post
methodunderg
post Sep 15 2011, 08:06 AM
Post #4


Ameteur Member

Posts: 38
Joined: 16-January 11



I spose I should put this in the Requests topic, but since it sort of relates to this.. I was wondering..

Initially when Boris developed ENB, he didn't include a shortcut-key to disable/enable DoF. You can press Shift+F8-F11 to disable certain effects in the game, but none of them disable DoF. I is it possible to edit the .ini via cleo to change the 'EnableDepthOfField=' field from 0 to 1, and vice versa? Maybe as a shortcut key too (Shift+F7).

This would be much appreciated over @ the ENB community on GTAForums banana.gif wub.gif
Go to the top of the page
 
+Quote Post
Reply to this postStart new topic

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: