String.split taking string as an instance

So i have this problem that i dont know why but it takes string as an instance?
Tried searching on devforum and hasnt found anything (yet),
all variables are set correctly.

  • Error Image
    image

  • Code

--loadMap
local function loadMap(stringData)

    local blocks = str_splt(stringData, ";") --Error line

    for i,v in blocks do

        loadVoxel(str_splt(v, ":"))

    end

end

loadMap("1:0,1,0:0;2:1,1,0:0;3:-1,1,0:0;0:1,0,0")

Show the str_splt function code a tell what exactly is the stringData.

local str_splt = string.split

And the stringData is the thing in the loadMap(“1:0,1,0:0;2:1,1,0:0;3:-1,1,0:0;0:1,0,0”)

1 : 0,1,0 : 0
ID X,Y,Z RotId

For me it works. The problem lies somewhere else, make sure that stringData is a string in all cases. I am sure that somewhere in the code the first argument to loadMap is not a string.

1 Like

so i probbably have wrong data