So love.js doesn't support goto?
- Gunroar:Cannon()
- Party member
- Posts: 1150
- Joined: Thu Dec 10, 2020 1:57 am
So love.js doesn't support goto?
I just tried to port one of my games to love.js (I used makelove to build) but it turns out it gives a syntax error for goto since it uses an old version of lua(?). My "engine" (a looot of reused code and libs in a folder) use gotos probably quite often. Is there truly no workaround but to rewrite aaall those sections?
Re: So love.js doesn't support goto?
OT: "Gotos baaad"

Re: So love.js doesn't support goto?
goto is a Lua 5.2 thing, and LuaJIT implements it as an extension. However, love.js can't run LuaJIT and runs PUC Lua 5.1 instead, as far as I know, so I'm afraid you're out of luck.
You can always try to compile your own PUC Lua 5.1 backporting the goto extension from 5.2, but I guess that's not an option for you. The only remaining one is to hope that some time in the future, LuaJIT implements WebAssembly.
You can always try to compile your own PUC Lua 5.1 backporting the goto extension from 5.2, but I guess that's not an option for you. The only remaining one is to hope that some time in the future, LuaJIT implements WebAssembly.
- Gunroar:Cannon()
- Party member
- Posts: 1150
- Joined: Thu Dec 10, 2020 1:57 am
Re: So love.js doesn't support goto?
Yeah, thanks everyone. It seems gotos really are bad overall. I only had like 5 in my whole +100 file code base I think.l, so even libraries don't use it that much.
Who is online
Users browsing this forum: Ahrefs [Bot] and 0 guests