Lua binding code error

tolua_cocos2dx_GLProgram_setUniformLocationF32 function does’t work.
right code is here:
static int tolua_cocos2dx_GLProgram_setUniformLocationF32(lua_State* tolua_S)
{
if (nullptr == tolua_S)
return 0;

int argc = 0;
GLProgram* self = nullptr;
int location = 0;
double f1 = 0.0;
double f2 = 0.0;
double f3 = 0.0;
double f4 = 0.0;

#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
if (!tolua_isusertype(tolua_S,1,“cc.GLProgram”,0,&tolua_err)) goto tolua_lerror;
#endif

self = (GLProgram*)  tolua_tousertype(tolua_S,1,0);

#if COCOS2D_DEBUG >= 1
if (nullptr == self)
{
tolua_error(tolua_S,“invalid ‘self’ in function ‘tolua_cocos2d_GLProgram_getProgram’\n”, nullptr);
return 0;
}
#endif

argc = lua_gettop(tolua_S) - 1;

if (argc >= 2 && argc <= 5)
{

#if COCOS2D_DEBUG >= 1
if (!tolua_isnumber(tolua_S,2,0,&tolua_err) ||
!tolua_isnumber(tolua_S,3,0,&tolua_err))
{
goto tolua_lerror;
}
#endif

    location = (int)  tolua_tonumber(tolua_S,2,0);
    f1 = (float)  tolua_tonumber(tolua_S,3,0);
    
    if (2 == argc)
    {
        self->setUniformLocationWith1f(location,f1);
        return 0;
    }
    
    if (argc >= 3)
    {

#if COCOS2D_DEBUG >= 1
if (!tolua_isnumber(tolua_S,4,0,&tolua_err))
goto tolua_lerror;
#endif

        f2 = (float)  tolua_tonumber(tolua_S,4,0);
        if (3 == argc)
        {
            self->setUniformLocationWith2f(location, f1, f2);
            return 0;
        }
    }
    
    if (argc >= 4)
    {

#if COCOS2D_DEBUG >= 1
if (!tolua_isnumber(tolua_S,5,0,&tolua_err))
goto tolua_lerror;
#endif

        f3 = (float)  tolua_tonumber(tolua_S,5,0);
        if (4 == argc)
        {
            self->setUniformLocationWith3f(location, f1, f2, f3);
            return 0;
        }
    }
    
    if (argc == 5)
    {

#if COCOS2D_DEBUG >= 1
if (!tolua_isnumber(tolua_S,6,0,&tolua_err))
goto tolua_lerror;
#endif

        f4 = (float)  tolua_tonumber(tolua_S,6,0);
        if (5 == argc)
        {
            self->setUniformLocationWith4f(location, f1, f2, f3, f4);
            return 0;
        }

    }
}

CCLOG("'setUniformLocationF32' function of GLProgram wrong number of arguments: %d, was expecting %d\n", argc, 2);
return 0;

#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function ‘setUniformLocationF32’.",&tolua_err);
return 0;
#endif

}

请问这是针对哪个版本的修改?我和现在的代码对比了下没什么区别呢?

哎,这个是中文版论坛啊,我还用不及格的英语憋了几个字出来。。。
我的是3.0版本,但是我看github上面最新的代码也还是错的。
主要是f4 = (float) tolua_tonumber(tolua_S,6,0);
if (5 == argc)
以前是
f4 = (float) tolua_tonumber(tolua_S,3,0);
if (4 == argc)
这样,当参数是5个时,这个函数将不会工作!并且
即使改了这儿,由于f2,f3,f4都是取的f1相同的值,所以即使传了4个参数,也只会传4个与f1相同的值进去。

明白了,谢谢!