diff --git a/extensions/scripting/lua-bindings/script/cocostudio/CocoStudio.lua b/extensions/scripting/lua-bindings/script/cocostudio/CocoStudio.lua index 60fd56a67a..ee7254a958 100644 --- a/extensions/scripting/lua-bindings/script/cocostudio/CocoStudio.lua +++ b/extensions/scripting/lua-bindings/script/cocostudio/CocoStudio.lua @@ -2,9 +2,7 @@ if nil == ccs then return end -if not json then - json = cjson -end +local json = require 'cjson' require "cocos.cocostudio.StudioConstants" diff --git a/extensions/scripting/lua-bindings/script/init.lua b/extensions/scripting/lua-bindings/script/init.lua index 670609c77e..ceeb043ec3 100644 --- a/extensions/scripting/lua-bindings/script/init.lua +++ b/extensions/scripting/lua-bindings/script/init.lua @@ -22,6 +22,7 @@ THE SOFTWARE. ]] +-- lua-5.4 if (math.pow == nil) then math.pow = function (x,y) return x ^ y