I’m getting that error every time I attempt to run this code;
local inventory = string.split(ply:GetNWString(“inventory”), “,”)
for k, v in pairs(inventory) do
Msg("K: “…k…” V: “…v…”
Can anyone help?
Can you specify what line this code is erring on?
I thought it may be that I’m trying to perform string.split whilst getting a NWString but remedying this didn’t fix it as I also tried;
local nwInventory = ply:GetNWString(“inventory”)
local inventory = string.split(nwInventory, “,”)
Use string.Explode, AFAIK string.split is a fucked up function.
How so? It just inverts the argument order and returns the result of string.Explode [Source].
The string split in there is uppercase S, whereas a lowercase s appears to be some builtin lua function.