Page 1 of 1

IGame.GetColorPackage(string colorPackageName) returns null

Posted: Fri Apr 03, 2020 1:27 am
by Danger Ross
This method is the only way to get RGB colors from clothing items and it doesn't function.
It probably went unnoticed because it has very limited uses, but I've come into a situation where I need it.
This is taken from the in game code:

Image

Re: IGame.GetColorPackage(string colorPackageName) returns null

Posted: Sat Apr 04, 2020 10:49 am
by Gurt
By design.
Observe the documentation: "returns null if not found."
Not all clothing items have a color package and those will return an empty string if you try to read it.

Re: IGame.GetColorPackage(string colorPackageName) returns null

Posted: Sun Apr 05, 2020 6:18 am
by Danger Ross
Gurt wrote:
Sat Apr 04, 2020 10:49 am
By design.
Observe the documentation: "returns null if not found."
Not all clothing items have a color package and those will return an empty string if you try to read it.
The function literally can't return anything but null. There is not a single color package name that works.

Re: IGame.GetColorPackage(string colorPackageName) returns null

Posted: Mon Apr 06, 2020 10:46 pm
by Gurt
Danger Ross wrote:
Sun Apr 05, 2020 6:18 am
Gurt wrote:
Sat Apr 04, 2020 10:49 am
By design.
Observe the documentation: "returns null if not found."
Not all clothing items have a color package and those will return an empty string if you try to read it.
The function literally can't return anything but null. There is not a single color package name that works.
Yeah, you're right. I see that now. Missing a return statement somewhere along the way :roll: Fixed after v.1.3.5.