Hi everyone…
I have seen the error …more than 60 upvalues
a few times, when I have a lot of code in one scene
I just take some part’s of that code and move it to another scene
like I just take 4 images and from create Scene and move them to show scene
But now I did that and I have almost nothing, and still I get that 60 upvalues problem.
I have a keyboard on my app(with 13 white and black rectangles, to form the piano)
on each rectangle I am adding an event listener to do something
inside that function I have something like this
local function playFaSharp() if isRightFaS == true then if isRightSolB == true then if numberRnd == 16 then print ("Solb Bemol") if pmLive \>= 1 then if isMoving == false then moveBoat() changeNotes() end end end else if isRightFaS == true then if numberRnd == 9 then print ("Fa# Sostenido") if pmLive \>= 1 then if isMoving == false then moveBoat() changeNotes() end end end else destroyBoat( ) end end audio.play(playGsound) return true end keyFaS:addEventListener("tap", playFaSharp)
I think if I have that 13 times, probably that is too much
but I don’t know how to do that better, or with less code
I have seen something like
if red == true or yellow == false then
but I don’t really know how to do this
I hope someone can help me figure this up
and I would like to know more why is the 60 upvalue error
thanks