playerPawn vs playerPawn.Value, etc
What's the difference between playerPawn and playerPawn.Value? weapon and weapon.Value? etc. What should I work with and when? What should I check for null and IsValid? Where can I read about this?
- e.g. playerPawn is the handler of the entity, playerPawn.Value is the actual entity
- playerPawn.Value after check valid
- whenever you wanna change value or use function on the entity, check with != null && IsValid (not 100% accurate)
- docs.cssharp.dev
Should I also check handler of the entity for valid?
When you access .Value or .Get() on a handle, it will return null if its invalid, so you only need to check for null after accessing the value.
This issue has been marked needs-author-action and may be missing some important information.
This issue has been automatically marked no-recent-activity because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity.
This issue will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days.