Studio throwing random error

I have a function connecting a server script which contains a table and a local script to do whatever with what it got from the server. The table the server returns is basically:

{["TestName"] = {["description"] = "Test Description"}, ["maxcount"] = 5}

Heres what i’m doing on the client:

-- info is the table
local description = info["description"]
local max_count = info["maxcount"]

and just this defining causes this error: attempt to index number with 'description'

How is this even happening? Please help.

From what ive understood this just means that the “info” variable is a number but you expect it to be a table. why this is i have no idea since i havent got acces to more of the code. You can try printing the info variable and see what it prints

holy moly I’m really dumb. I accidently put the maxcount as its own index instead of being inside the table, thanks lol.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.