#Table.insert(tab,player.UserId) adding both the player's ID and Name for no reason

61 messages · Page 1 of 1 (latest)

void moon
#

Nobody has been able to crack it, and it's hindering me from testing my game further to work on other aspects of the game

#

the function in question

#

GetIG()

void moon
void moon
# remote tide where is the table insert

What’s happening is, I’ve already added the player. So when I do GetIG I get the table which should be full of UserIds only and use it in the larger function at the top of the post

#

I explicitly add only the UserId but it adds player name too for some reason

#

This is the error I got

remote tide
#

might as well use ctrl + f and find any duplicates if you can access studio

void moon
#

But I’m 100% sure that these PlayerState functions are the only ones that can access the STATEBANK

#

I’ll have to check game mode scripts

#

Or voteStart

#

At some point I have to move Lobby players to Ingame, so an error may have occurred there

void moon
#

alr for now I put a pcall on it so it doesn't stop th ecode

remote tide
#

not a good long-term solution

#

but if you wanna focus on something else first you could do that

void moon
#

What else would I do

#

I have it only add UserId and it keeps adding my username with it

#

can't seem t ofind out what the problem is

remote tide
void moon
#

I have a lot of modules

#

Do I only show the functions invovled

#

i guess ima do that

remote tide
#

yea

#

show the relevant ones

void moon
#

the error is occuring in this function:

#

Having errors with my INGAME table

#

Shows it is only adding UserId

remote tide
#

show me what statemod.GetID is for

#

like what does it return

void moon
remote tide
#

and what code is in it

void moon
#

alr

#

I will show

#

see what I mean

whole compassBOT
#

studio** You are now Level 5! **studio

void moon
#

im only adding UserId, but it also adds my name too

remote tide
#

so weird!

void moon
#

The printout for Output

#

this is the Ingame table

#

It should only have my ID

#

but it also has my name

remote tide
#

you used ctrl + f yet?

#

go check for any table.insert

void moon
#

alr

remote tide
# void moon

this only means your player instance is being inserted right after the user id

void moon
#

I will search

#

will get back to you

#

found the issue

#

inserting player and not player.UserId

#

I made this function assuming argument #1 is already a UserId, so now I will have to go through each script and find the ones that are using this function and change the arguments accordingly