Sign in to follow this  
Followers 0
Golbez

read multiple items from an ini..

3 posts in this topic

ok heres what i need to do.. read a whole section of items and see if they are eqiual to 1.

if they are equal to 1 then i see to see if the item (stuff from diabloII) name currently on the ground..

my problem is..

i dont understand how to read the whole section then check and see if the item is there..

i know i have to do:

IniReadSection(@ScriptDir & "items.ini", "items")

(ini file:)

[items]

; 1 meaning keep it

; 0 meaning leave it

shako = 1

warhat = 0 "meaning leave it"

sallet = 0

Share this post


Link to post
Share on other sites



from the helpfile:

$var = IniReadSection("C:\Temp\myfile.ini", "section2")
If @error Then 
    MsgBox(4096, "", "Error occurred, probably no INI file.")
Else
    For $i = 1 To $var[0][0]
        MsgBox(4096, "", "Key: " & $var[$i][0] & @CRLF & "Value: " & $var[$i][1])
    Next
EndIf
so you have to do youre check in the for loop.

Share this post


Link to post
Share on other sites

that will work :whistle:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0