lua-users home
lua-l archive

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


Hi Folks

I'm having an issue with my program and you might have the solution.

I'm using Lua in C++ and I'm executing my commands with LuaL_dostring(LuaState, str.data()).
The string passed looks like : "LuaFunction("arg1","arg2","arg3",......,"arg280")"

Everything works fine when my fonction has less than 250 arguments but I receive an error for more arguments.
The Lua error I receive for more than 250 arguments is [string "LuaFunction("arg1","arg2","arg3..."]:1: function or _expression_ too complex near 'arg250'

So I changed the Lua value of MAXSTACK in llimits.h and set it to 1000
Now the function works fine for more than 250 arguments, but I can't go over 256 arguments.
The Lua error I receive for more than 256 arguments is [string "LuaFunction("arg1","arg2","arg3..."]:1: attempt to call a string value

What did I do wrong? Do I have to change another parameter in Lua?

Thanks in advance for your replies


Votre vie privée l'est-elle vraiment ? Internet Explorer 8 vous protège gratuitement