Jump to content

invaild value (boolean) at i


WASSIm.

Recommended Posts

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
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) 

It means that 'args' is returning a boolean instead of a table.

Link to comment
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...