Hi! So, I'm trying to script a command for Basic Admin Essentials 2.0. I'm doing it as a plugin in the BAE plugin folder. I want to make a checkwarns command, I want it to say the players name too but when I add ..Player.. it shows the "attempt to concatenate table with string" error. Here's the code :p
local function pluginFunction(Args)
local Player = Args[1]
if Args[3] then
local Victims = returnPlayers(Player, Args[3]) if not Victims then return end
local combinedVictims = ''
for a,b in pairs(Victims) do
if combinedVictims == '' then
combinedVictims = b.Name
else
combinedVictims = combinedVictims..', '..b.Name
end
end
for a,b in next,Victims do
remoteEvent:FireClient(b,'Notif','Check Warns','The User '..Victims..' has no warns.',{'Message','Results',combinedVictims})
end
end
end
Please help, thanks! Note: this isnt the full code, just the part I think the error is from.
No more help needed! I fixed the issue by simply just replacing..Victims.. with ..b.Name..

1 comment
try using
unpack(Victims)orbat line 14