Page 1 of 1
LUA ~ how can i verify if functions , var or table exists ?
Posted: Mon Jan 30, 2017 2:00 am
by skinkairewalker
hi everyone !
Lua Question ~ How can i verify if funcions , variables or tables exists in lua code or lua file ?
someone know how can i do it ?

Re: LUA ~ how can i verify if functions , var or table exist
Posted: Mon Jan 30, 2017 2:55 am
by IdeasVacuum
In the IDE, use Find String.
Re: LUA ~ how can i verify if functions , var or table exist
Posted: Mon Jan 30, 2017 5:35 pm
by skinkairewalker
thanks by you answer xD !
Re: LUA ~ how can i verify if functions , var or table exist
Posted: Mon Jan 30, 2017 5:38 pm
by skinkairewalker
i have another question !
every time if i call command > " lua_getglobal " , and " lua_call() " , i can run especific function in lua code ... but ... if have a syntax error , lua stop working ... ( lua dont verify if have errors ) ...
what can i do to fix it ?
Re: LUA ~ how can i verify if functions , var or table exist
Posted: Tue Jan 31, 2017 12:57 am
by Dadido3
Hi,
just use lua_pcall instead of lua_call.
I even gave you a full example in an earlier post:
http://www.purebasic.fr/english/viewtop ... 76#p499376
Re: LUA ~ how can i verify if functions , var or table exist
Posted: Tue Jan 31, 2017 3:57 am
by skinkairewalker
thanks by you answer
now working fine
