RichardT Posted April 30, 2010 Posted April 30, 2010 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..."
AdmiralAlkex Posted April 30, 2010 Posted April 30, 2010 That means the variable isn't an array. Any more strange questions? .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
bogQ Posted April 30, 2010 Posted April 30, 2010 (edited) 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 April 30, 2010 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - 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.
enaiman Posted April 30, 2010 Posted April 30, 2010 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 :)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now