Jump to content

invaild value (boolean) at i


WASSIm.

Recommended Posts

Posted

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) 

Omerta Roleplay

Posted
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.

Posted

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

Previously known as MrTasty.

Posted
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 ?

Omerta Roleplay

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

Previously known as MrTasty.

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