Page 1 of 1

IGame.WriteToConsole() will throw exception when trying to print enum values

Posted: Wed Mar 25, 2020 7:45 am
by NearHuscarl
You should be able to print out enum values without having to call ToString(). Code to reproduce:

Code: Select all

enum E { One, Two, Three }

public void OnStartup()
{
	Game.WriteToConsole(E.One); // not working
	Game.WriteToConsole(E.One.ToString()); // works
}

Re: IGame.WriteToConsole() will throw exception when trying to print enum values

Posted: Fri Mar 27, 2020 8:11 pm
by Gurt
Fixed after v.1.3.5:
Removed IGame.WriteToConsole(string text) in favor for the new IGame.WriteToConsole(object param[] args) to avoid ambiguous calls between the two.