Mtasa-blue: isElementAttached() returns false instead of nil

Created on 25 Sep 2018  路  5Comments  路  Source: multitheftauto/mtasa-blue

Describe the bug
See title. Its not a gamebreaking bug and its not important, but i note it here because i can.

To reproduce
crun tostring(isElementAttached(me))
-> nil (string)

Expected behaviour
The wiki states that the function returns false if the specified element is not attached or if an improper argument is passed.

Multi Theft Auto v1.5.6-release-14403

bug good first issue

All 5 comments

Nah we want it the other way around, and on the client side because the code is fine here.

It should return nil if a bad argument was provided. Otherwise there's no way to determine between function failure or "no the element was not attached".

Returns true if the specified element is attached to another element, false if it is not attached or nil if an improper argument was passed.

See #821

Literally all other functions return false when they fail for any reason, i dont see why this function should do anything else.

Fixed in 866506d3f6ebe4a0d4d39664cc4e7d7c0cef1a7c

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rk-r picture rk-r  路  4Comments

CrosRoad95 picture CrosRoad95  路  3Comments

CrosRoad95 picture CrosRoad95  路  4Comments

qaisjp picture qaisjp  路  3Comments

commanderagu picture commanderagu  路  3Comments