This post is for anyone who is writing their own Codea Addons or using the ones on our Github page.
The exported Xcode project from Codea contains a file called luaconf.h. This file has a bug and should be replaced by the one here: http://codea.io/lib/luaconf.h
It effects the results of functions like luaL_checknumber and causes them to return incorrect values.
The exported project template will be fixed in Codea 2.2 (unfortunately it didn’t make 2.1.1)