Deprecated.lua corrections

New version of the file included. Stop erroneous deprecated messages to be issued.

Fix them all.

Note this file is from E:2d-x\scripting\lua\script\Deprecated.lua
This file is copied to your project. Multiple copies may exist.

There is a number of assignments which invoke the function and should be a reference to the function name.

*G = ccColor3BDeprecated
instead of
*G[“ccColor3B”] = ccColor3BDeprecated

Good luck

Andre


Deprecated.lua.zip (5.0 KB)

What do you mean? Are these deprecated lua functions useless,we will remove these?

They have been removed already.
Whoever programmed version 3.0 added the file Deprecated.lua, which loads in a different stack space, and issues a warning when a Lua program uses a deprecated function. This makes porting much easier.

Very useful file, but it contains some errors this is why I posted this corrected version.

If you port a Lua program to version 3.0 replace
COCOS2D\scripting\lua\script\Deprecated.lua with this file.

Hope this helps

Andre

It’s a bug of deprecated.lua,
_G["ccColor3B"] = ccColor3BDeprecated() wants to return a table of Color3B,but Color3B was not register in the _G table.so when call ccColor3B(),it led to error.
Thank you for your reminding.