Sign in to follow this  
Followers 0
ajag

file.au3 / _FileReadToArray

5 posts in this topic

Hi,

when I use the _FileReadToArray function like shown in the AutoIt-Help

#include <file.au3>
Dim $aRecords
If Not _FileReadToArray("error.log",$aRecords) Then
   MsgBox(4096,"Error", " Error reading log to Array     error:" & @error)
   Exit
EndIf
For $x = 1 to $aRecords[0]
    Msgbox(0,'Record:' & $x, $aRecords[$x])
Next

I get errors:

C:\Program Files\AutoIt3\Include\file.au3(122,57) : ERROR: SetError() [built-in] called with wrong number of args.

If Not FileExists($sPath) Then Return SetError(1, 1, "")

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

Can anybody help?


Rule #1: Always do a backup         Rule #2: Always do a backup (backup of rule #1)

Share this post


Link to post
Share on other sites



Hi,

when I use the _FileReadToArray function like shown in the AutoIt-Help

#include <file.au3>
Dim $aRecords
If Not _FileReadToArray("error.log",$aRecords) Then
   MsgBox(4096,"Error", " Error reading log to Array     error:" & @error)
   Exit
EndIf
For $x = 1 to $aRecords[0]
    Msgbox(0,'Record:' & $x, $aRecords[$x])
Next

I get errors:

C:\Program Files\AutoIt3\Include\file.au3(122,57) : ERROR: SetError() [built-in] called with wrong number of args.

If Not FileExists($sPath) Then Return SetError(1, 1, "")

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

Can anybody help?

well did you create error.log document in your scriptdir?


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

Hi bogQ,

yes, the file was there.

But I solved the problem by

- delete all AutoIt entrys from the registry

- delete the AutoIt install directory

- install AutoIt

(simply re-installing AutoIt did not solve the problem)

thx,

ajag


Rule #1: Always do a backup         Rule #2: Always do a backup (backup of rule #1)

Share this post


Link to post
Share on other sites

Hi bogQ,

yes, the file was there.

But I solved the problem by

- delete all AutoIt entrys from the registry

- delete the AutoIt install directory

- install AutoIt

(simply re-installing AutoIt did not solve the problem)

thx,

ajag

Wow. :P

How old was your previous version of AutoIt you had installed...?

:(


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Wow. :P

How old was your previous version of AutoIt you had installed...?

:(

Oh no, the first version installed on this computer was v3.2.10.0 and I already updated to v3.2.12.1 a few weeks ago. The install routine found the old version (3.2.10.0) and deinstalled it before installed the new one (3.2.12.1).

When the error came up, I tried

- re-install the new version (which was allready installed!) -> same error

- deinstall and after that

- install -> same error

- opened this threat

- delete all like mentioned

- install the new version -> bingo

But never mind, everythings works fine now :idea:


Rule #1: Always do a backup         Rule #2: Always do a backup (backup of rule #1)

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