attempt to index upvalue 'columnapi' (a boolean value)

Hi,

I wonder if anyone could tell me what I’m doing wrong here, please?..

This is my code, in a file called “main.lua” (no hidden extension; I checked)…

local ui = require( “ui” )
local block = require( “BlockCls” )
local columnapi = require( “Column” )

local speed = 500
local columntotal = 10

– adds blocks when there are none falling
local function CheckBlocks( event )
local isfalling = false
local blocks = columnapi.GetBlocks()
for i = 1, #blocks do
if (blocks.isfalling) then
isfalling = true
end
end
if (not isfalling) then
column:AddBlock( block:CreateBlock( math.random( 1, columntotal ), 0, speed ) )
end
end

local gameTimer = timer.performWithDelay( speed, CheckBlocks, 0 )

And this is the output in the terminal window…

Copyright © 2009-2010 A n s c a , I n c .
Version: 2.0.0
Build: 2010.7.29.1
The file sandbox for this project is located at the following folder:
(/Users/eudoxus/Library/Application Support/Corona Simulator/BC142C5F1E4A4BA6DB49A0E01B492F22)
Runtime error
…eudoxus/Documents/Corona/MyApps/SlideBlocks/main.lua:11: attempt to index upvalue ‘columnapi’ (a boolean value)
stack traceback:
[C]: ?
…eudoxus/Documents/Corona/MyApps/SlideBlocks/main.lua:11: in function ‘_listener’
?: in function <?:413>
?: in function <?:186>

I can’t figure out why the “columnapi” is seen to be a boolean.

Thanks for any and all help,

Matt. [import]uid: 8271 topic_id: 1807 reply_id: 301807[/import]

Ok, turns out I was missing the “module(…, package.seeall)” in the library files!

D’oh!

Matt. [import]uid: 8271 topic_id: 1807 reply_id: 5405[/import]