Alright, So I'm just trying to modify dark rp just to increase my lua abilities and so I can get somewhat of a grasp on lua. So anyway, after spending some time adding new classes and shipments and what not, I get the game up and running and I press the f4 button and I get this error.
[lua]DarkRp\gamemode\showteamtabs.lua:437: bad argument #1 to 'ipairs' (table expected, got nil)[/lua]
I can't figure why it's doing that or what the fix would be, If anybody could help I would be grateful.
Maybe you didn't add it to the team's tab of that game-mode? I don't know.
This is what line 437 reads and the rest of the function(I think) in the showteamtabs.lua thing.
[lua]for k,v in ipairs(RPExtraTeams) do
if LocalPlayer():Team() ~= k then
local nodude = true
if v.admin == 1 and not LocalPlayer():IsAdmin() then
nodude = false
end
if v.admin > 1 and not LocalPlayer():IsSuperAdmin() then
nodude = false
end
if (type(v.NeedToChangeFrom) == "number" and LocalPlayer():Team() ~= v.NeedToChangeFrom) or (type(v.NeedToChangeFrom) == "table" and not table.HasValue(v.NeedToChangeFrom, LocalPlayer():Team())) then
nodude = false
end
if nodude then
local weps = "no extra weapons"
if #v.Weapons > 0 then
weps = table.concat(v.Weapons, "\n")
end
if v.Vote then
local condition = ((v.admin == 0 and LocalPlayer():IsAdmin()) or (v.admin == 1 and LocalPlayer():IsSuperAdmin()) or LocalPlayer():GetNWBool("Priv"..v.command))
AddIcon(v.model, v.name, v.Des, weps, "/vote"..v.command, condition, "/"..v.command)
else
AddIcon(v.model, v.name, v.Des, weps, "/"..v.command)
end
end
end[/lua]
Function thing..
Just for the record, Do you have the latest SVN?
it seems you broke the file RPExtraTeams is defined in.
How do I fix it D:?
Update your svn, And put the teams and weapons back in.
Fixed, Thanks :P
Sorry, you need to Log In to post a reply to this thread.