Jump to content

Why do I get an error when it used to work

Recommended Posts

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:


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

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

$aSplit = StringSplit($aArray^ ERROR


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..."

Link to comment
Share on other sites

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


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


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


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)

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.

Link to comment
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

  • Recently Browsing   0 members

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