Jump to content
Sign in to follow this  

@error statement

Recommended Posts


If I put:

If Not @error Then

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

Share this post

Link to post
Share on other sites

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

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

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.