[SOLVED] Issues getting LUBE up and running

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Frohman
Prole
Posts: 21
Joined: Sat Dec 08, 2012 12:32 pm

[SOLVED] Issues getting LUBE up and running

Post by Frohman »

Hey there again, I've been having some issues getting LUBE up and running, and decided to ask here as it's a more relevant sub-forum for it:

I've been trying to set up LUBE (versions 1.0 and the current dev version) with no luck - my attempts have been as follows:

This is the main.lua of my test game, which fails (attempt to call field 'udpClient' (a nil value))

Code: Select all

local Vector = require "hump.vector"
local Class = require "hump.class"
require "LUBE" -- for the intertubes
require "player"


universe = {}
p = LocalPlayer(Vector(200, 200))

local client

function love.load()
	love.graphics.setBackgroundColor(33, 89, 125)

	cfg = love.filesystem.read("userconfig.cfg")
	ip, port = cfg:match("^(.+):(%d+)$")
	assert(ip and port)

	client = lube.udpClient()
	client.callbacks.recv = onReceive
	p:load()
end

function love.update(dt)
	p:update(dt)
	p:integrate(dt)
end

function love.draw()
	p:draw()
end

function onReceive(data)
	print(data)
end
So I decided to break it down as simply as I could:
This fails with the same error, attempt to call field 'udpClient' (a nil value)

Code: Select all

local Class = require "hump.class"
require "LUBE"

local user = lube.udpClient()
And this runs successfully, but doesn't print anything

Code: Select all

local Class = require "hump.class"
require "LUBE"

for k,v in pairs(lube) do
	print(k,v)
end
There must be something I'm doing wrong here

EDIT
Turns out the changes made to HUMP.class 5 days ago (https://github.com/vrld/hump/commit/9f6 ... ac7c3ed130) made it incompatible with LUBE, and that was what was causing all these issues!
Post Reply

Who is online

Users browsing this forum: No registered users and 33 guests