• bad key to string index (number expected, got string)
    2 replies, posted
[B]Error:[/B] [code][@ShiftRP\gamemode\client\inventory.lua:220] bad key to string index (number expected, got string)[/code] [B]Script:[/B] [lua] if Shift_Prestige[v].CanUse then local PaU = vgui.Create("DImageButton", Pa) PaU:SetPos(10,125) PaU:SetImage("gui/silkicons/wrench") PaU:SizeToContents() PaU:SetToolTip("Use Item") PaU.DoClick = function() --LINE 220 print("Test: "..v) RunConsoleCommand("shift_usepitem", tostring(v)) end end[/lua]
ShiftPrestige is a string not a table.
[QUOTE=Coon;31707666]ShiftPrestige is a string not a table.[/QUOTE]Fixed it now. Thanks.
Sorry, you need to Log In to post a reply to this thread.