altmp / altv-js-module

JS module for alt:V Multiplayer. Powered by NodeJS & v8
MIT License
54 stars 36 forks source link

RMLUI Invalid entity bug #237

Closed Lekenthu closed 1 year ago

Lekenthu commented 1 year ago

Description of the problem

Hi.

I create RMLUI successfully but getElementByID does not return correct value.

Error message: [02:38:55][Error] GetEntity: Invalid entity with type [02:38:55][Error] GetEntity: Invalid entity with type [02:38:55][Error] [V8] Exception at one_hud:nametag.mjs:99 [02:38:55][Error] nametagRML.getElementByID("npcNames").appendChild(rml); [02:38:55][Error] TypeError: Cannot read properties of null (reading 'appendChild') at createNpcRml (nametag.mjs:99:40) at nametag.mjs:243:33

Reproduction steps

Code: let nametagRML = new alt.RmlDocument('/rml/nametag.rml'); const rml = nametagRML.createElement('div'); nametagRML.getElementByID("npcNames").appendChild(rml);

Expected behaviour

The code works in the release branch, and a few days ago it even worked in the rc branch.

Additional context

No response

Operating system

Windows 11

Version

13.0-rc11, branch rc

Scope

client

Reproduction tested

ZackaryH8 commented 1 year ago

I am also having this issue, it just returns null

C0kkie commented 1 year ago

Fixed in newest dev