lua-users home
lua-l archive

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


> 	__index = function(object, key)
> 			local result = SpriteMethods[key] or
> 				AnimationMethods[key]
	Variable result could be false?

> 			if result == nil then
> 				result = (ObjectTables[SSGetUserDataObjectPtr(object)] or {})[key]
	Again: result could be false?

> 				if result == nil then
> 					result = IdentityMethods[key] or
> 						ObjectMethods[key] or
> 						AdvanceableSpriteMethods[key]
> 				end
> 			end
>
> 			return result
> 		end,
	If the variable `result' could receive a `false' value, you might not
change the code.

	Tomas