Hi,
habe folgendes Problem:
eine variable geht beim aufruf einer anderen funktion verloren, hier der code:
Spoiler anzeigen
#include <guiconstants.au3>
$x = 10
$y = 10
$GUI = GUICreate ("Teams eingeben",200, 70)
$lbl = GUICtrlCreateLabel ("Teams getrennt durch Kommas eingeben!", 5, 5, 200, 15)
$OK = GUICtrlCreateButton ("OK!", 80, 48, 40, 20)
$teams = GUICtrlCreateInput ("Team1,Team2", 10, 25, 180, 20)
GUISetState (@SW_SHOW)
While 1
$guimsg = GUIGetMsg()
Switch $guimsg
Case $OK
GUISetState (@SW_HIDE)
_getvalues()
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func _getvalues()
$input = GUICtrlRead ($teams)
$team = StringSplit ($input, ",")
MsgBox (0,0,$team[0])
_calc()
EndFunc
Func _calc()
$ergebnis_Gui = GUICreate ("Aufstellungen", 120, 200)
$exit = GUICtrlCreateButton ("OK!", 40, 170, 40, 25)
For $i = 2 To $Team[0]
GUICtrlCreateLabel ($team[1] & " - " & $team[$i], 10, $y)
$y = $y + 12
Next
For $i = 3 To 5
GUICtrlCreateLabel ($team[2] & " - " & $team[$i], 10, $y)
$y = $y + 12
Next
For $i = 4 To 5
GUICtrlCreateLabel ($team[3] & " - " & $team[$i], 10, $y)
$y = $y + 12
Next
For $i = 5 To 5
GUICtrlCreateLabel ($team[4] & " - " & $team[$i], 10, $y)
$y = $y + 12
Next
GUISetState (@SW_SHOW, $ergebnis_GUI)
Sleep (10000)
Exit
EndFunc
ich krieg folgenden error:
Spoiler anzeigen
hat jemand nen tip?