-
-
Notifications
You must be signed in to change notification settings - Fork 488
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Milestone
Description
Describe the bug
Many player functions process the element provided as CElement*
instead of CPlayer*
, causing inconsistency between some of the functions. For example, by providing root
as the element, it will not throw a warning, while some of the functions do.
To Reproduce
getPlayerIP(root)
->false
, no warninggetPlayerSerial(root)
->false
, warning
Expected behavior
Make all functions work consistently. Specific class function -> require that specific class element.
MTA Client & Server
Multi Theft Auto v1.5.5-release-13977
Additional context
- Should probably also check out other classes while at it.
- I stumbled across to this problem while helping someone with a script problem on our Discord #scripting channel. They were using these two functions together and they asked me why does it throw an error on serial, but not on IP (IP was before serial). I then investigated and found these inconsistencies. And I agree, it is a stupid inconsistency that has to be fixed.
- Does not require backwards compatibility as the only thing changing is we're essentially adding a warning.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers