I am trying to be able to get data from a script (textinput.js) from the script (saveText.js) and I received an error when trying to do so.
I am trying to get the data ‘inputext’. Please tell me what I have done wrong and how to fix it. I would highly appreciate it.
The project link: PlayCanvas 3D HTML5 Game Engine
The error I received:
[[saveText.js?id=228177194&branchId=6c8ce5fe-55e0-441a-9373-69cefa0f109a:13]](https://playcanvas.com/editor/code/1341716?tabs=228177194&line=13&col=47&error=true): Uncaught TypeError: Cannot read properties of undefined (reading 'inputext')
TypeError: Cannot read properties of undefined (reading 'inputext')
at ElementComponent. (https://launch.playcanvas.com/api/assets/files/scripts/saveText.js?id=228177194&branchId=6c8ce5fe-55e0-441a-9373-69cefa0f109a:13:47)
at ElementComponent.fire (https://code.playcanvas.com/playcanvas-2.7.4.dbg.js:1728:27)
at ElementInput._fireEvent (https://code.playcanvas.com/playcanvas-2.7.4.dbg.js:127784:22)
at ElementInput._onElementMouseEvent (https://code.playcanvas.com/playcanvas-2.7.4.dbg.js:127687:27)
at ElementInput._handleUp (https://code.playcanvas.com/playcanvas-2.7.4.dbg.js:127498:15)