WASSIm. Posted July 16, 2015 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)
xXMADEXx Posted July 16, 2015 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.
Addlibs Posted July 16, 2015 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
WASSIm. Posted July 17, 2015 Author 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 ?
Addlibs Posted July 22, 2015 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)
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