Każdy pomysł, dlaczego jest to nie tak w Lua?jeśli, w przeciwnym razie, jeśli i koniec Lua
if Pieza == 1 then
if Rotacion == 1 then
Piezas = Cuadrado1
else if Rotacion == 2 then
Piezas = Cuadrado2
else if Rotacion == 3 then --this is Line 273
Piezas = Cuadrado3
else if Rotacion == 4 then
Piezas = Cuadrado4
else
io.write("Me Envio una rotacion que no existe? \n");
end
--this end closes the if inside the first if the one using to compare Rotacion
else if Pieza == 2 then
if Rotacion == 1 then
Piezas = I1
else if Rotacion == 2 then
Piezas = I2
else if Rotacion == 3 then
Piezas = I3
else if Rotacion == 4 then
Piezas = I4
else
io.write("Me Envio una rotacion que no existe? \n");
end
--this end closes the if inside the first if the one using to compare Rotacion
else --this else is in case Pieza != 1 || 2
io.write("Me Envio una pieza que no existe? \n");
end --this close the whole if (the one comparing "Pieza")
Błąd Dostaję jest to „koniec” oczekiwano (do zamknięcia „if” at line 273) w pobliżu „inny”
Ponadto, dodając końcówkę po każdym razie (nie jest to co powinno zrobić, ale mimo to wypróbować) nie działa ...
Jeśli potrzebujesz mnie przetłumaczyć na angielski chętnie zrobię to komentarze i wszystko, ale myślałem, że to nie jest konieczne dla tego pytania.
To jest dobre pytanie. Miałem ten sam problem, kiedy zaczynałem programowanie z Luą! –
haha tak naprawdę jestem używany do C++ i C# więc jeszcze jeśli wydaje mi się poprawny XD – Makenshi