Jump to content
Sign in to follow this  
t0ddie

Dang errors

Recommended Posts

t0ddie

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
Jos

@t0ddie,

What do you think this red line does for you ?

If GUICtrlread($realm[1]) = 1 Then

$realm = "USEast"


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
t0ddie

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  

×

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.