Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

IGame.GetColorPackage(string colorPackageName) returns null

Here you can find all solved gameplay problems and bugs (beginning from Pre-Alpha 1.8.8).
Forum rules
By using the forum you agree to the following rules. For this forum you also need to follow these additional rules.
Locked
User avatar
Danger Ross
Superfighter
Superfighter
Posts: 154
Joined: Thu Mar 31, 2016 12:56 am
Title: Dangerous
SFD Alias: Danger Ross
Started SFD: 14 june 2012 (launch day)
Location: California
Gender:
Age: 23

IGame.GetColorPackage(string colorPackageName) returns null

Post by Danger Ross » Fri Apr 03, 2020 1:27 am

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
1 x
sorry bucko, you can't punch with swords 8-)

User avatar
Gurt
Lead Programmer
Lead Programmer
Posts: 1884
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Gender:
Age: 34

Post by Gurt » 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.
0 x
Gurt

User avatar
Danger Ross
Superfighter
Superfighter
Posts: 154
Joined: Thu Mar 31, 2016 12:56 am
Title: Dangerous
SFD Alias: Danger Ross
Started SFD: 14 june 2012 (launch day)
Location: California
Gender:
Age: 23

Post by Danger Ross » 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.
1 x
sorry bucko, you can't punch with swords 8-)

User avatar
Gurt
Lead Programmer
Lead Programmer
Posts: 1884
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Gender:
Age: 34

Post by Gurt » Mon Apr 06, 2020 10:46 pm

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.
1 x
Gurt

Locked