Sign in to follow this  
Followers 0
t0ddie

Dang errors

3 posts in this topic

If GUICtrlread($realm[2]) = 1 Then
If GUICtrlread($realm^ ERROR

Error: Subscript used with non-Array variable.

i dont see how this can be.

here is some code that is in the gui

Dim $realm[5]
$realm[1] = GUICtrlCreateradio("East", 108, 200, 50, 15)
$realm[2] = GUICtrlCreateradio("West", 108, 220, 50, 15)
$realm[3] = GUICtrlCreateradio("Asia", 108, 240, 50, 15)
$realm[4] = GUICtrlCreateradio("Europe", 108, 260, 50, 15)

and here is code from a function

If GUICtrlread($realm[1]) = 1 Then
$realm = "USEast"
EndIf
If GUICtrlread($realm[2]) = 1 Then
$realm = "USWest"
EndIf
If GUICtrlread($realm[3]) = 1 Then
$realm = "Europe"
EndIf
If GUICtrlread($realm[4]) = 1 Then
$realm = "Asia"
EndIf

i dont understand... i dont get an error for the first array variable.

why do i get one for the second?


Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

its for another part of the script that i did not include

RegWrite("HKEY_CURRENT_USER\Software\Blizzard Entertainment\Diablo II", "Preferred Realm", "REG_SZ", $realm)

its a seperate variable.... it should not effect the array variable "realm" but i suppose its redeclaring the array variable realm[]

ill just rename that variable lol

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

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  
Followers 0