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
this is a really easy fix, just change this https://github.com/multitheftauto/mtasa-blue/blob/927509565ab3a8d48df006440654c38e0942aa89/Server/mods/deathmatch/logic/luadefs/CLuaElementDefs.cpp#L1139 to say lua_pushnil(luaVM);
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