Jump to content
Sign in to follow this  
holjeron508

Array error - Very frustrating

Recommended Posts

holjeron508

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

Share this post


Link to post
Share on other sites
Yashied

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

Share this post


Link to post
Share on other sites
Valuater

A very good effort for a 1st post phil... follow Yashied's lead and you will do fine

8)

Edited by Valuater

NEWHeader1.png

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.