Asti kinect control example

Typically: "How do I... ", "How can I... " questions
Post Reply
jesdefer

Asti kinect control example

Post by jesdefer »

Hi!

I have connected my kinnect to my pc and checked that interface to kinect.ttm works. But, when I have runned astiKinectControl.ttt example without modifying nothing, it appears the following errors:

Code: Select all

Lua runtime error: [string "SCRIPT Asti"]:26: attempt to index local 'client' (a nil value)
stack traceback:
	[string "SCRIPT Asti"]:256: in function <[string "SCRIPT Asti"]:256>
	[string "SCRIPT Asti"]:26: in function 'writeSocketData'
	[string "SCRIPT Asti"]:69: in function <[string "SCRIPT Asti"]:63>
	[C]: in function 'xpcall'
	[string "SCRIPT Asti"]:256: in main chunk
It seems like client varible is not defined, but it is:

Code: Select all

local client=socket.tcp()
What is it going wrong?
Thanks!

Jesus

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: Asti kinect control example

Post by coppelia »

Hello

Not sure about your full code, but client seems to be a local. So are you in the same scope as where the local was defined?

Cheers

jesdefer

Re: Asti kinect control example

Post by jesdefer »

Hi Coppelia,

I haven't modified the sample code. I am not pretty sure what are you trying to say about being in the same scope.
Thanks!

Jesus.

jesdefer

Re: Asti kinect control example

Post by jesdefer »

Hi again Coppelia,

I have finally understood what you was meanning. In sample code lines 233 and 234 client and socket are defined as local, but they aren't:

Code: Select all

socket=require("socket")
 client=socket.tcp()
Thanks!

Jesus

Post Reply