Jump to content
Sign in to follow this  
RichardT

Why do I get an error when it used to work

Recommended Posts

RichardT

hello everyone

I have this script that someone wrote for me (sorry can't remember who), and it was working fine, but it just stopped working? I get the following error:

***********Mine*********

D:\Scripts\try2work.au3 (109) : ==> Subscript used with non-Array variable.:

$aSplit = StringSplit($aArray[$sIPos], "GUID:", 1)

$aSplit = StringSplit($aArray^ ERROR

***********Mine*********

Here is the code:

$sFilePath = "c:\EngineConnect\LocalGUID.txt"

_FileReadToArray ($sFilePath, $aArray)

$sIPos = _ArraySearch ($aArray, "GUID:", 0, 0, 0, 1)

$aSplit = StringSplit($aArray[$sIPos], "GUID:", 1)

$sGUID = $aSplit[2]

What is a non-array variable?


"so much work, so little brains..."

Share this post


Link to post
Share on other sites
bogQ

you shud ask the one who created it (forum have search button)

or

to provide the small script and LocalGUID.txt that can replicate problem so that we can see where the problem is.

What is a non-array variable?

$normalvar = "data1"

$arrayvar[0] = "data1"

$arrayvar[1] = "data2"

...

If IsArray($arrayvar) Then

do something

else

msgbox(0,"", "error something is wrong")

endif

Edited by bogQ

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
enaiman

It looks like your file does not exist.

Try to debug the script yourself - look at @error value after each line, if it is not 0 then something is wrong. The help file will be your friend.


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

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.