Hot to call functions like toString() , DumpEntities() from a LUA?

0

Hi,

When I try to use toString() or DumpEntities() functions from a simple LUA i get:

[Error] scripts/main_menu/main_menu_boot.lua:15: attempt to call global 'toString' (a nil value)---------- START STACK TRACE ---------- =C: toStringscripts/main_menu/main_menu_boot.lua(15): ? ---------- END STACK TRACE ----------

toString is supposed to be some kind of global ?

DumpEntities if from entityutils.lua

Do I need to load those files at boot ?

How to achieve this ?

Thanks in advance.

Nicolas

asked 7 years ago238 views
5 Answers
0
Accepted Answer

Hey @REDACTEDUSER

As for DumpEntities(), let me dig into that and get back to you —

answered 7 years ago
0

Thanks very much for the fast answer.

yes toststring(...) works instead of toString()

for info: several docs refer to toString() like this one:

http://docs.aws.amazon.com/lumberyard/latest/developerguide/lua-scripting-ces.html

(looks been updated in the meantime ?)

as for DumpEntities() it is documented there:

http://docs.aws.amazon.com/lumberyard/latest/developerguide/lua-scripting-ref-entityutils.html

I cannot figure if need to include some additional .lua files ?

Thanks again.

answered 7 years ago
0

DumpEntities is maybe a Legacy thing that is not available anymore ?

anyway, I was looking for the set of functions to find/findByName entities kind. Any idea where I can find that kind of utills ?

Thanks. Nick

answered 7 years ago
0

Hi @REDACTEDUSER

For the utils you're looking for, http://docs.aws.amazon.com/lumberyard/latest/developerguide/scriptbind_system.html has what you need (specifically GetEntityByName and GetEntityIdByName). Let us know how those work for you!

answered 7 years ago
0

Thanks. I will check that.

Nick

answered 7 years ago

This post is closed: Adding new answers, comments, and votes is disabled.