lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Your first line is setting osc = true, since require "osc" returns true.

require "osc";
...

-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br on behalf of Damian Stewart
Sent: Sat 5/13/2006 12:21 AM
To: Lua list
Subject: newbie prob with 'require'
 
ok, i have managed to resurrect the luakit via google's cache, but now 
i'm getting another issue. this is the first time i've had to use the 
'require' function so it's probably me.

here's what happens:

$ lua test.lua
d:\bin\lua.exe: test.lua:2: attempt to index global `osc' (a boolean value)
stack traceback:
         test.lua:2: in main chunk
         [C]: ?

and here's test.lua:

1| osc = require( 'osc' )
2| p = osc.Message:new()
3| p.address = '/in/foo'
4|...

should osc.lua be returning something? reading the documentation it 
looks like it's supposed to just return true or false. if i say 
'print(osc)' i get 'true' printed out. so what else might be wrong?

cheers
d
-- 
f r e y
live music with computers
http://www.frey.co.nz



<<winmail.dat>>