Invalid type specified in the documentationSolved
object OnDispenserGather(ResourceDispenser dispenser, BaseEntity entity, Item item)
{
    Puts("OnDispenserGather works!");
    return null;
}

Instead of "BaseEntity" should be "BasePlayer" in the documentation.
Spent time on this :(

Emm BaseEntity is parent for BasePlayer.

BTW Docs is out of date.

oESHrLEd4Ji1r5d.jpg ArtiIOMI

Emm BaseEntity is parent for BasePlayer.

BTW Docs is out of date.

 

Yes, but when you compare types for example: entity.GetType() == typeof(BaseEntity) will work incorrectly in my context due to outdated documentation.
I am studying development for the first month and documentation is very important to me.
It's bad that the documentation is abandoned. 😞
bananamen4ik

 

Yes, but when you compare types for example: entity.GetType() == typeof(BaseEntity) will work incorrectly in my context due to outdated documentation.
I am studying development for the first month and documentation is very important to me.
It's bad that the documentation is abandoned. 😞

Better for you will be using decompilator like ILSpy or dotPeek,

bananamen4ik

 

Yes, but when you compare types for example: entity.GetType() == typeof(BaseEntity) will work incorrectly in my context due to outdated documentation.
I am studying development for the first month and documentation is very important to me.
It's bad that the documentation is abandoned. 😞

That isn't really the best way to check for types. You're likely better of using is or casting and null checking. Even still if you want to do it that way then you should probably use typeof(BaseEntity).IsAssignableFrom(entity.GetType()). But I'll update the docs to show the correct type.

Also the docs aren't abandoned?

oESHrLEd4Ji1r5d.jpg ArtiIOMI

Better for you will be using decompilator like ILSpy or dotPeek,

Thanks! I'm already using "JustDecompile" 😌

wXLxOgFUEnSjh1r.png 0x89A

That isn't really the best way to check for types. You're likely better of using is or casting and null checking. Even still if you want to do it that way then you should probably use typeof(BaseEntity).IsAssignableFrom(entity.GetType()). But I'll update the docs to show the correct type.

Also the docs aren't abandoned?

Thanks! I'll try your way. If I find other inaccuracies, I will report it. 👍

Locked automatically