Jump to content

Array error - Very frustrating


Recommended Posts

See snipet...

Func _LVComDllTest()

Local $hdl_lvComDll, $stringIn

Local $A[16] = ["0"]

Local $B[16] = ["0"]

$hdl_lvComDll=DllOpen("Q:\LV85Projects\builds\COMDLL\COMDLLrc1\lvcom.dll")

$A=DllCall($hdl_lvComDll,"none:cdecl","Func_CfgSerial_init", "str", $hdl_lvComDll, "str", "19200", "str", "none", "str", "", "int", 16)

$stringIn=GUICtrlRead($input_0)

$B=DllCall($hdl_lvComDll,"none:cdecl","Func_Serial_TxRx", "str", $A[4], "str", $stringIn, "str", "250", "str", "", "str", "", "int", 16, "int", 16)

$junk=DllClose($hdl_lvComDll)

GUICtrlSetData($lbl_0, $B[4] & $B[5])

Return 0

EndFunc

What am I doing wrong here I keep getting the following error when I run this script:

C:\Documents and Settings\phyoung\Desktop\HXStuff\HX_Test.au3 (70) : ==> Subscript used with non-Array variable.:

$B=DllCall($hdl_lvComDll,"none:cdecl","Func_Serial_TxRx", "str", $A[4], "str", $stringIn, "str", "250", "str", "", "str", "", "int", 16, "int", 16)

$B=DllCall($hdl_lvComDll,"none:cdecl","Func_Serial_TxRx", "str", $A^ ERROR

I attached the whole script.

Thanks,

holjeron508

HX_Test.au3

Link to comment
Share on other sites

From the code that you showed, I see you have a very vague understanding of what you have written here, and how it works. To start, read this, please.

EDIT:

Ah, welcome to the forum.

>_<

Edited by Yashied
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...