RunConsoleCommand adds quotes to arguments

I am trying to make an in game ban command equivalent to banid from console. I would use the player:ban method but I need it to work for any steam ID, online or not. I’ve got everything all set up, then when I want to execute the actual ban I use

RunConsoleCommand( “banid”, time, STEAM_ID, “kick”)

I printed both variables: print(time) -> 1 … print(STEAM_ID) -> STEAM_0:0:20880955

My problem is that for whatever reason, “RunConsoleCommand” seems to add quotes to its arguments so I get
Can’t ban users with ID “STEAM_0:0:20880955”

I also tried
RunConsoleCommand( “say”, “hello” )

And in game I see-- Console: “hello”

I feel like I’m crazy but I simply cannot figure out what could be wrong.

Alternatively, You could also use game.ConsoleCommand



game.ConsoleCommand( string.format( "banid %i %s kick
", time, STEAM_ID ) )


That fixed my problem so personally my issue is solved, although I still think it is worth investigating this because it seems like a bug.

It’s not.