Jump to content

do we have any fixes to findout "Subscripts dimension" for array variable?


vaish
 Share

Recommended Posts

Hello there,

Do we have any fixes for finding out "Subscripts dimension range exceeded" for array variable?

I am not getting any solution for this issue:

Script:

Func ReadStatus()

Local $array

Local $file = @WorkingDir&"\"&$statusFileName

If Not FileExists($file) Then

KConsoleWrite("Can not get status file from Device "&$deviceIp,1)

EndIf

$array = KFileReadToArray($file)

if IsArray($array) Then

For $arrayIndex = 1 To $array[0]

If StringInStr($array[$arrayIndex], "inhibit") Then

$arrayString = StringRegExp($array[$arrayIndex], "/boardControl/channel/inhibitStart(.*) =", 1)

$reverse = GetReverseChannelBoardMapping($arrayString[0])

$array[$arrayIndex] = StringRegExpReplace($array[$arrayIndex], "/boardControl/channel/inhibitStart.* = ", "ChannelEnableStatus"& $reverse & "=")

ElseIf StringInStr($array[$arrayIndex], "/encstatus/encoderStatus") Then

$arrayString = StringRegExp($array[$arrayIndex], "/encstatus/encoderStatus/(.*)/1 =", 1)

$array[$arrayIndex] = StringRegExpReplace($array[$arrayIndex], "/encstatus/encoderStatus.* = ", "ChannelRunningStatus"& $arrayString[0] & "=")

EndIf

Next

AssignVariable($array)

EndIf

EndFunc

Or do i have change above script in different format?

any help/points appreciated.

Thanks

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
 Share

  • Recently Browsing   0 members

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