Lua Run File Doesnt Work
Hello, lua run file doesnt seem to work :

It say nil :/
And also, how to call an UFunction from lua with parameters ? Thx
Hi, LuaRunFile does not run code assets, it runs plain files from the filesystem. To run UFunction you need to register them in the LuaState using LuaValue as arguments
Oh ok, but so, we cant "RunLuaFile" with a .lua in project ?
Also, i removed some functions in my lua script but they seems to be always here
You can have .lua files in the content directory but they are completely different from LuaCode Assets. Read: you cannot change the LuaCode asset and expect the .lua file will be changed accordingly, they serves different purposes (one allows after-builds modifications, the other will be hardcoded in the final binary). If you want to edit scripts from Unreal itself, just do not use lua files, but only LuaCode Assets and use LuaRunCodeAsset to load/parse/execute them.
Oh ok, i see thank you, and like i said, i had functions (but i removed it, in the .lua) and the lua stack continue executing it, whats the problem ? I think lua memorized my functions
It is in the previous answer :) you are changing the code asset instead of the lua files, or (but i doubt about it) you are expecting that just changing the content of the file will be enough for lua (you need to reparse/execute it, you can re-run LuaRunFile or LuaRunCodeAsset multiple times for the same LuaState)
Oh ok sorry i didnt see ! I will check, thank you :)
LuaRunCodeAsset doesnt resolve the problem LuaRunFile dont found my file.. Ouch :/
Ok i figured out the "problem", i was calling a function that doesnt exist in my .lua file BUT i was expecting that lua dont care about that