Brothers 24 Report post Posted July 14, 2023 Hey all, I try to read Lua_err and i want it as clean as possible, because i think they show broken stuff? Also when i type &misreload ingame, i want it to be clean, so for me, there are no bugs/errors. Now i see this for example: [07-14 21:48:54]resource/script/calculate/skilleffect.lua:16835: attempt to call global `GetPetUreLV' (a nil value) Im this far, i know i need to go to skill effect, and read the 16835's line. I think it is looking for GetPetUreLV but it cant find anywhere in system, am i right? Quote Share this post Link to post Share on other sites
AlGhoul 66 Report post Posted July 14, 2023 This means that 'GetPetUreLV' doesn't exist, you should opt-out calling the function by deleting all the calls associated. for faster searching (If you are not using some of these tools already) you can use either VS Code or Notepad++; Notepad++ is even better searching directories and list of files for a specific content, however VS Code is sufficient if you are searching in a project/folder that's already open in your workspace. &misreload is reloading some files, also any files that are loaded with 'dofile' function are reloaded with them; so any plugins/extensions are also reloaded, if you are not checking for already initialized tables and/or data, you will be re-initializing them which would cause problems in many cases. Unfortunately many public extensions are poorly written and don't have any initialization checking. Quote Kind regards, AG. Share this post Link to post Share on other sites
Brothers 24 Report post Posted July 15, 2023 18 hours ago, AlGhoul said: This means that 'GetPetUreLV' doesn't exist, you should opt-out calling the function by deleting all the calls associated. for faster searching (If you are not using some of these tools already) you can use either VS Code or Notepad++; Notepad++ is even better searching directories and list of files for a specific content, however VS Code is sufficient if you are searching in a project/folder that's already open in your workspace. &misreload is reloading some files, also any files that are loaded with 'dofile' function are reloaded with them; so any plugins/extensions are also reloaded, if you are not checking for already initialized tables and/or data, you will be re-initializing them which would cause problems in many cases. Unfortunately many public extensions are poorly written and don't have any initialization checking. Thanks for yourreply. Can i ignore it ? Or would that cause any problems? I seemed to fix a different lua err, which caused me that i didnt earn any exp after killing mobs. Quote Share this post Link to post Share on other sites
Mdrst 38 Report post Posted July 15, 2023 2 hours ago, Brothers said: Thanks for yourreply. Can i ignore it ? Or would that cause any problems? I seemed to fix a different lua err, which caused me that i didnt earn any exp after killing mobs. It will certainly cause problems, as the function is being called somewhere but the expected behavior is not returned. But you can ignore it if its from a secondary feature that you don't use. Quote "Beware of bugs in the above code; I have only proved it correct, not tried it." - Donald E. Knuth Share this post Link to post Share on other sites
BXlevovich 22 Report post Posted July 15, 2023 23 часа назад, Brothers сказал: Hey all, I try to read Lua_err and i want it as clean as possible, because i think they show broken stuff? Also when i type &misreload ingame, i want it to be clean, so for me, there are no bugs/errors. Now i see this for example: [07-14 21:48:54]resource/script/calculate/skilleffect.lua:16835: attempt to call global `GetPetUreLV' (a nil value) Im this far, i know i need to go to skill effect, and read the 16835's line. I think it is looking for GetPetUreLV but it cant find anywhere in system, am i right? Try add this in function.lua function GetPetUreLV(fairy_item) local strLv = GetItemAttr( fairy_item,ITEMATTR_VAL_STR ) local conLv = GetItemAttr( fairy_item,ITEMATTR_VAL_CON ) local agiLv = GetItemAttr( fairy_item ,ITEMATTR_VAL_AGI ) local dexLv = GetItemAttr( fairy_item,ITEMATTR_VAL_DEX ) local staLv = GetItemAttr( fairy_item ,ITEMATTR_VAL_STA ) return strLv + conLv + agiLv + dexLv + staLv end Quote Share this post Link to post Share on other sites