diff --git a/extensions/scripting/lua-bindings/script/init.lua b/extensions/scripting/lua-bindings/script/init.lua index 6c8eeb20ba..670609c77e 100644 --- a/extensions/scripting/lua-bindings/script/init.lua +++ b/extensions/scripting/lua-bindings/script/init.lua @@ -22,6 +22,12 @@ THE SOFTWARE. ]] +if (math.pow == nil) then + math.pow = function (x,y) + return x ^ y + end +end + require "cocos.cocos2d.Cocos2d" require "cocos.cocos2d.Cocos2dConstants" require "cocos.cocos2d.functions"