leafi / love-eclipse-ldt Goto Github PK
View Code? Open in Web Editor NEWLOVE2D Eclipse LDT Execution Environment. That means you get autocomplete and all that.
LOVE2D Eclipse LDT Execution Environment. That means you get autocomplete and all that.
Love2D released 0.10.0
Please update
Just something I figured out when it comes to running love games from eclipse,
Right click main.lua > run as > run conf > select the current project > runtime interpreter set to alternate interpreter > manage interpreters > add > lua 5.1 with the executable as the love.exe and set the args to
. -e "io.stdout:setvbuf('no')"
That will allow the run button to start the game!
Hi, I tried installing and get this error when trying to build the default project:
Exception in thread "main" com.naef.jnlua.LuaRuntimeException: C:\Users\russtopia\workspace\hello-love\main.lua:10: attempt to index global 'love' (a nil value)
at com.naef.jnlua.LuaState.lua_pcall(Native Method)
at com.naef.jnlua.LuaState.call(LuaState.java:555)
at org.eclipse.ldt.support.lua51.internal.interpreter.JNLua51Launcher.run(JNLua51Launcher.java:128)
at org.eclipse.ldt.support.lua51.internal.interpreter.JNLua51Launcher.main(JNLua51Launcher.java:143)
Platform: Win7-64, JRE 1.8.0_71, Eclipse Mars, love-eclipse-ldt 0.10.1
Hi,
I just follow the instruction (pre-built version) on your page at Github. I downloaded the ZIP file and add as a new environment configuration. When I try to run the example, I got the following error:
Exception in thread "main" com.naef.jnlua.LuaRuntimeException: ...rive/workspace-desktop-ubuntu/Lua Alo Mundo/main.lua:8: attempt to index global 'love' (a nil value) at com.naef.jnlua.LuaState.lua_pcall(Native Method) at com.naef.jnlua.LuaState.call(LuaState.java:555) at org.eclipse.ldt.support.lua51.internal.interpreter.JNLua51Launcher.run(JNLua51Launcher.java:128) at org.eclipse.ldt.support.lua51.internal.interpreter.JNLua51Launcher.main(JNLua51Launcher.java:143)
The example is (I tried to code the example use the code tag, but something wrong happening - sorry):
`
-- This is the main entry point of your LOVE2D game.
-- Feel free to delete the callbacks you don't need,
-- and visit https://www.love2d.org/wiki/love if you need more.
-- for rectangle example
local x, y, w, h = 20, 20, 60, 20
function love.load()
end
function love.draw()
-- Draw a coloured rectangle.
love.graphics.setColor(0, 100, 100);
love.graphics.rectangle('fill', x, y, w, h);
end
function love.update(dt)
-- Grow the rectangle.
w = w + 1
h = h + 1
end
function love.keypressed(key, isrepeat)
end
function love.keyreleased(key)
end
function love.textinput(text)
end
function love.mousepressed(x, y, button)
end
function love.mousemoved(x, y, dx, dy)
end
function love.mousereleased(x, y, button)
end
`
Can you help me, please!
Thanks in advanced.
Alexandre
How do I run the Love project from Eclipse itself? If I were to run it from the terminal I'd have to run love .
inside the root directory of the project, how is this done in Eclipse?
Thanks!
'=' expected near 'continue' DLTK Problem, says Eclipse LDT + Love2D 11.1
Here's the code:
for x = 1, numCols do
-- if skipping is turned on and we're on a skip iteration...
if skipPattern and skipFlag then
-- turn skipping off for the next iteration
skipFlag = not skipFlag
-- Lua doesn't have a continue statement, so this is the workaround
goto continue
else
-- flip the flag to true on an iteration we don't use it
skipFlag = not skipFlag
end
b = Brick(
-- x-coordinate
(x-1) -- decrement x by 1 because tables are 1-indexed, coords are 0
* 32 -- multiply by 32, the brick width
+ 8 -- the screen should have 8 pixels of padding; we can fit 13 cols + 16 pixels total
+ (13 - numCols) * 16, -- left-side padding for when there are fewer than 13 columns
-- y-coordinate
y * 16 -- just use y * 16, since we need top padding anyway
)
-- if we're alternating, figure out which color/tier we're on
if alternatePattern and alternateFlag then
b.color = alternateColor1
b.tier = alternateTier1
alternateFlag = not alternateFlag
else
b.color = alternateColor2
b.tier = alternateTier2
alternateFlag = not alternateFlag
end
-- if not alternating and we made it here, use the solid color/tier
if not alternatePattern then
b.color = solidColor
b.tier = solidTier
end
table.insert(bricks, b)
-- Lua's version of the 'continue' statement
::continue::
end
I thought maybe this was an error here because erasing the goto and ::continue:: stuff makes the error go away, but I can't see how adding them back (proper syntax) causes this.
It seems like Eclipse thinks that goto is a variable, and doesn't recognize it as a keyword. It thinks it should be goto = continue. Because when I write it like that, the error changes.
When I do
goto = continue
then it tells me that ::continue:: has a nil name (from detaching it from goto, I don't know the term).
So I think it's not properly recognizing goto for what it is. It's missing from the interpreter.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.