Jump to content

Recommended Posts

Posted (edited)

If I put:

If Not @error Then
     IniRead(...
EndIf

before i do any action like IniRead,IniWrite,IniReadSection, etc will it prevent errors from appearing when my script is compiled/run such as if the ini is not present,renamed,etc?

Edited by coder09
Posted (edited)

No. @error always reffers to the last function called, which sets @error (see docu for which functions do this).

If ini is not present, the default value in iniread will be used.

if IniRead("test","test","test", '') then msgbox(0,"","Success")

Iniwrite will create the file and return 1 on success.

if iniwrite() = 1 then msgbox(0,"","Success")

Inireadsection will set @error

IniReadSection()
if not @error then msgbox(0,"","Success")
Edited by KaFu

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...