Im a beginner at Livecode and my englisch is very bad so please dont judge me.
I have a big Problem: Ich just want to start two methods at the same time by clicking one Button. The Problem is that when i click the Button the first method starts, but the second doesn't start.
The code just looks like that:
on Mouseup
starter1
starter2
end Mouseup
start1 and start2 are the two Methods.
I hope someone knows a good way to fix my little Problem with Livecode.
Thanks Kiliaan
EDIT: This is the Code the Problem occured
Code: Select all
on beginn
go to card "game"
put 1 into stacky
put 0 into frager
put 4000 into timer
put 4500 into timer2.1
put 0 into score
put score into fld "lab"
wait 3 seconds
starter1
starter2
end beginn
###########################################################################################################
on starter1
put timer-100 into timer
put random(timer) into timer2
if timer2<300 then
put 300 into timer2
end if
wait timer2 milliseconds with messages
set backgroundcolor of grc "g1" to "green"
start1.1
end starter1
on start1.1
if stacky = 1 then
repeat with t = 1 to 11
if clicker1=1 then
put 0 into clicker1
set backgroundcolor of grc "g1" to "black"
put 0 into counter
add 1 to score
put score into fld "lab"
starter1
exit start1.1
else
add 1 to counter2
if counter2 = 10 then
put 0 into counter2
put 0 into score
put score into fld "lab"
set backgroundcolor of grc "g1" to "red"
wait 2 seconds
set backgroundcolor of grc "g1" to "black"
put 0 into stacky
go to card "menü"
exit start1.1
end if
end if
wait 120 milliseconds with messages
end repeat
end if
end start1.1
##########################################################################################################
on starter2
put timer2.1-100 into timer2.1
put random(timer) into timer2.2
if timer2.2<300 then
put 300 into timer2.2
end if
wait timer2.2 milliseconds with messages
set backgroundcolor of grc "g2" to "green"
start2.2
end starter2
on start2.2
if stacky = 1 then
repeat with t = 1 to 11
if clicker2=1 then
put 0 into clicker2
set backgroundcolor of grc "g2" to "black"
put 0 into counter
add 1 to score
put score into fld "lab"
starter2
exit start2.2
else
add 1 to counter
if counter = 10 then
put 0 into counter
put 0 into score
put score into fld "lab"
set backgroundcolor of grc "g2" to "red"
wait 2 seconds
set backgroundcolor of grc "g2" to "black"
put 0 into stacky
go to card "menü"
exit start2.2
end if
end if
wait 120 milliseconds with messages
end repeat
end if
end start2.2