Jump to content

Error in array


Glyph
 Share

Recommended Posts

#region --- GuiBuilder code Start ---
; Script generated by AutoBuilder 0.6 Prototype

#include <GuiConstants.au3>
GuiCreate("AColorBot V0.1 By: Backstabbed", 392, 316,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))
$0=(IniRead( @ScriptDir & '\Settings.ini', 'Char', '0', 'Value not found!!' ))
$1=(IniRead( @ScriptDir & '\Settings.ini', 'Char', '1', 'Value not found!!' ))
$2=(IniRead( @ScriptDir & '\Settings.ini', 'Char', '2', 'Value not found!!' ))
$3=(IniRead( @ScriptDir & '\Settings.ini', 'Char', '3', 'Value not found!!' ))
$4=(IniRead( @ScriptDir & '\Settings.ini', 'Char', '4', 'Value not found!!' ))
$5=(IniRead( @ScriptDir & '\Settings.ini', 'Char', '5', 'Value not found!!' ))
$6=(IniRead( @ScriptDir & '\Settings.ini', 'Char', '6', 'Value not found!!' ))
$7=(IniRead( @ScriptDir & '\Settings.ini', 'Char', '7', 'Value not found!!' ))

$8=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '8', 'Value not found' ))
$9=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '9', 'Value not found' ))
$10=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '10', 'Value not found' ))
$11=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '11', 'Value not found' ))
$12=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '12', 'Value not found' ))
$13=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '13', 'Value not found' ))
$14=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '14', 'Value not found' ))
$15=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '15', 'Value not found' ))
$game=(IniRead( @ScriptDir & '\Settings.ini', 'Game', '16', 'Value not found!!' ))
$save1=(IniRead( @ScriptDir & '\Settings.ini', 'SaveBut', '17', 'Value not found!' ))

dim $input[17]
$Input[0] = GUICtrlCreateInput($0, 10, 10, 60, 20)
$Input[1] = GUICtrlCreateInput($1, 10, 40, 60, 20)
$Input[2] = GUICtrlCreateInput($2, 10, 70, 60, 20)
$Input[3] = GUICtrlCreateInput($3, 10, 100, 60, 20)
$Input[4] = GUICtrlCreateInput($4, 10, 130, 60, 20)
$Input[5] = GUICtrlCreateInput($5, 10, 160, 60, 20)
$Input[6] = GUICtrlCreateInput($6, 10, 190, 60, 20)
$Input[7] = GUICtrlCreateInput($7, 10, 220, 60, 20)

$Input[8] = GuiCtrlCreateLabel($8, 80, 10, 70, 20)
$Input[9] = GuiCtrlCreateLabel($9, 80, 40, 70, 20)
$Input[10] = GuiCtrlCreateLabel($10, 80, 70, 70, 20)
$Input[11] = GuiCtrlCreateLabel($11, 80, 100, 70, 20)
$Input[12] = GuiCtrlCreateLabel($12, 80, 130, 70, 20)
$Input[13] = GuiCtrlCreateLabel($13, 80, 160, 70, 20)
$Input[14] = GuiCtrlCreateLabel($14, 80, 190, 70, 20)
$Input[15] = GuiCtrlCreateLabel($15, 80, 220, 70, 20)
$Input[16] = GUICtrlCreateInput($game, 10, 250, 60, 20)

Dim $dwy[17]=['Char','Char','Char','Char','Char','Char','Char','Char','HexCode','HexCode','HexCode','HexCode','HexCode','HexCode','HexCode','HexCode','Game']

$save=GuiCtrlCreateButton($save1, 130, 270, 140, 30)
$gamelabel= GuiCtrlCreateLabel("Window Title", 80, 250, 70, 20)
GuiSetState(@SW_SHOW)
#endregion --- GuiBuilder generated code End ---
While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $save
        Save()
    Case $msg = $GUI_EVENT_CLOSE
        exit
    EndSelect
WEnd

Func Save()
    For $i = 0 To 16
        IniWrite( @ScriptDir & '\Settings.ini', $dwy[$i],$i, GUICtrlRead($input[$i]))
    Next
    MsgBox(0,"Saved Complete.","Saving settings please wait...")
    Sleep (1000)
    MsgBox(0,"Saved Complete.","Starting game...")
    Exit
EndFunc

Func OnAutoItExit()
Run('AColorFire.exe',@ScriptDir)
exit
EndFunc

Oddly enough when i run it with scite it works fine...

Edited by backstabbed

tolle indicium

Link to comment
Share on other sites

#region --- GuiBuilder code Start ---
; Script generated by AutoBuilder 0.6 Prototype

#include <GuiConstants.au3>
GuiCreate("AColorBot V0.1 By: Backstabbed", 392, 316,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))
$0=(IniRead( @ScriptDir & '\Settings.ini', 'Char', '0', 'Value not found!!' ))
$1=(IniRead( @ScriptDir & '\Settings.ini', 'Char', '1', 'Value not found!!' ))
$2=(IniRead( @ScriptDir & '\Settings.ini', 'Char', '2', 'Value not found!!' ))
$3=(IniRead( @ScriptDir & '\Settings.ini', 'Char', '3', 'Value not found!!' ))
$4=(IniRead( @ScriptDir & '\Settings.ini', 'Char', '4', 'Value not found!!' ))
$5=(IniRead( @ScriptDir & '\Settings.ini', 'Char', '5', 'Value not found!!' ))
$6=(IniRead( @ScriptDir & '\Settings.ini', 'Char', '6', 'Value not found!!' ))
$7=(IniRead( @ScriptDir & '\Settings.ini', 'Char', '7', 'Value not found!!' ))

$8=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '8', 'Value not found' ))
$9=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '9', 'Value not found' ))
$10=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '10', 'Value not found' ))
$11=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '11', 'Value not found' ))
$12=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '12', 'Value not found' ))
$13=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '13', 'Value not found' ))
$14=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '14', 'Value not found' ))
$15=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '15', 'Value not found' ))
$game=(IniRead( @ScriptDir & '\Settings.ini', 'Game', '16', 'Value not found!!' ))
$save1=(IniRead( @ScriptDir & '\Settings.ini', 'SaveBut', '17', 'Value not found!' ))

dim $input[17]
$Input[0] = GUICtrlCreateInput($0, 10, 10, 60, 20)
$Input[1] = GUICtrlCreateInput($1, 10, 40, 60, 20)
$Input[2] = GUICtrlCreateInput($2, 10, 70, 60, 20)
$Input[3] = GUICtrlCreateInput($3, 10, 100, 60, 20)
$Input[4] = GUICtrlCreateInput($4, 10, 130, 60, 20)
$Input[5] = GUICtrlCreateInput($5, 10, 160, 60, 20)
$Input[6] = GUICtrlCreateInput($6, 10, 190, 60, 20)
$Input[7] = GUICtrlCreateInput($7, 10, 220, 60, 20)

$Input[8] = GuiCtrlCreateLabel($8, 80, 10, 70, 20)
$Input[9] = GuiCtrlCreateLabel($9, 80, 40, 70, 20)
$Input[10] = GuiCtrlCreateLabel($10, 80, 70, 70, 20)
$Input[11] = GuiCtrlCreateLabel($11, 80, 100, 70, 20)
$Input[12] = GuiCtrlCreateLabel($12, 80, 130, 70, 20)
$Input[13] = GuiCtrlCreateLabel($13, 80, 160, 70, 20)
$Input[14] = GuiCtrlCreateLabel($14, 80, 190, 70, 20)
$Input[15] = GuiCtrlCreateLabel($15, 80, 220, 70, 20)
$Input[16] = GUICtrlCreateInput($game, 10, 250, 60, 20)

Dim $dwy[17]=['Char','Char','Char','Char','Char','Char','Char','Char','HexCode','HexCode','HexCode','HexCode','HexCode','HexCode','HexCode','HexCode','Game']

$save=GuiCtrlCreateButton($save1, 130, 270, 140, 30)
$gamelabel= GuiCtrlCreateLabel("Window Title", 80, 250, 70, 20)
GuiSetState(@SW_SHOW)
#endregion --- GuiBuilder generated code End ---
While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $save
        Save()
    Case $msg = $GUI_EVENT_CLOSE
        exit
    EndSelect
WEnd

Func Save()
    For $i = 0 To 16
        IniWrite( @ScriptDir & '\Settings.ini', $dwy[$i],$i, GUICtrlRead($input[$i]))
    Next
    MsgBox(0,"Saved Complete.","Saving settings please wait...")
    Sleep (1000)
    MsgBox(0,"Saved Complete.","Starting game...")
    Exit
EndFunc

Func OnAutoItExit()
Run('AColorFire.exe',@ScriptDir)
exit
EndFunc

Oddly enough when i run it with scite it works fine...

Can't see what's wrong. When do you get an error and what array causes the problem?
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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...