Why is my table spitting out garbage data when printed?

I’m trying to edit a module script, however, upon trying fix what I need fixed, I attempted to print out my teamdata table, and received this in return
image
every time i change teams, it spits out the same garbage data… What its meant to do is to print the data of which team the player is on.

Here, you will find the code that’s printing the odd data

local function sortTeams()
	--task.desynchronize()
	print 'SORT'
	print(teamData)
	if #teamData == 0 then
		print 'team data < 1'
		--task.synchronize()
		return
	end

i think you can only view this in the studio, not in the client

the problem with that is I cannot test the module script while on studio, for some odd reason. The module only works outside of studio.

i have no clue as to why, and practically gave up trying to figure out why…

shouldn’t you be doing #teamData:GetChildren() == 0?

Why dont you do:

print(table.unpack(teamData))

Team data is a table, so if you want to print its content, you should use the code I wrote above.

1 Like

interesting… there’s nothing within the table for some odd reason

image

but I suppose the solution to the printing of the table is what I was looking for, I just need to make sure it prints a number corresponding to the team change

nvm i realized you can’t do :GetChildren() on tables :sob:

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