WASSIm. Posted July 16, 2015 Share Posted July 16, 2015 Hi guys i need help, i got that problem and i try anyway to sloved it but nothing ERROR: ZA-staff/server.lua:239: invaild value (boolean) at indox 5 in table for 'concat' addEvent("onAdminEditPanel", true) addEventHandler("onAdminEditPanel", root, function (command, ...) if (command) and (...) then local args = {...} for i, v in ipairs(args) do if type(v) == "boolean" then table.remove(args, i) end end setTimer(executeCommandHandler, 100, 1, "c"..command, source, table.concat(args, " ")) end end) Link to comment
xXMADEXx Posted July 16, 2015 Share Posted July 16, 2015 Hi guys i need help, i got that problem and i try anyway to sloved it but nothingERROR: ZA-staff/server.lua:239: invaild value (boolean) at indox 5 in table for 'concat' addEvent("onAdminEditPanel", true) addEventHandler("onAdminEditPanel", root, function (command, ...) if (command) and (...) then local args = {...} for i, v in ipairs(args) do if type(v) == "boolean" then table.remove(args, i) end end setTimer(executeCommandHandler, 100, 1, "c"..command, source, table.concat(args, " ")) end end) It means that 'args' is returning a boolean instead of a table. Link to comment
WASSIm. Posted July 16, 2015 Author Share Posted July 16, 2015 but i use type and returning table Link to comment
Addlibs Posted July 16, 2015 Share Posted July 16, 2015 It means that one of the values in the table is not a valid concat type (in your case, it includes a boolean). Possible solution: Loop through the table and change all values to tostring() of their original values Link to comment
WASSIm. Posted July 17, 2015 Author Share Posted July 17, 2015 It means that one of the values in the table is not a valid concat type (in your case, it includes a boolean). Possible solution: Loop through the table and change all values to tostring() of their original values i can't remove values ? Link to comment
Addlibs Posted July 22, 2015 Share Posted July 22, 2015 table.remove() But you should loop the table backwards in this case Be careful when looping a table where you intend to delete multiple rows, if 2 of them are in a row the 2nd one will get skipped! You must loop the table backwards (reverse ipairs). For example: for i = #table, 1, -1 do(Read more at Scripting Tips) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now