Premium MrLibya 554 Posted April 14, 2015 Premium Share Posted April 14, 2015 (edited) hallo all i was asking about this : for e.g https://metin2.download/picture/pb3ULsa6HYLfwUcOgwdH2NiPvDMk5JB5/.png https://metin2.download/picture/Q5bcHlzcfifji6660FEFOr6q5znCh4V3/.png https://metin2.download/picture/IUS8jSKicqzdIjBWqY2s6kwx2WY0tQT3/.png the problem is ingame it's says can't find the table ! so where i did mistake ? Edited August 30, 2022 by Metin2 Dev Core X - External 2 Internal If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
Ken 904 Posted April 14, 2015 Share Posted April 14, 2015 (edited) Are you using this function in quest or are you calling this function from questlib.lua? questlib.lua ; local pc = pc or {} function pc.chat(text) print(text) end quest : quest test begin state start begin function chat(text) syschat(text) end when 9001.chat."Test me" begin setskin(NOWINDOW) test.chat("Mrlibya") end end end - How can you check your function is work or not? It's too simple. You can put breakpoint. So you can do like that ; function get_attr_armor_table() if (attr_wizerd.attr_armor_info != nil) then chat("attr_wizerd.attr_armor_info is not nil.") return attr_wizerd.attr_armor_info else chat("attr_wizerd.attr_armor_info is nil.") return 0 end return 0 end Kind Regards Ken Edited April 14, 2015 by Ken 1 Do not be sorry, be better. Link to comment Share on other sites More sharing options...
Premium MrLibya 554 Posted April 15, 2015 Author Premium Share Posted April 15, 2015 Are you using this function in quest or are you calling this function from questlib.lua? questlib.lua ; local pc = pc or {} function pc.chat(text) print(text) end quest : quest test begin state start begin function chat(text) syschat(text) end when 9001.chat."Test me" begin setskin(NOWINDOW) test.chat("Mrlibya") end end end - How can you check your function is work or not? It's too simple. You can put breakpoint. So you can do like that ; function get_attr_armor_table() if (attr_wizerd.attr_armor_info != nil) then chat("attr_wizerd.attr_armor_info is not nil.") return attr_wizerd.attr_armor_info else chat("attr_wizerd.attr_armor_info is nil.") return 0 end return 0 end Kind Regards Ken iam useing it for quest , the problem is ingame it's not show the table and says error : can't find table data_table01 If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
FakedMan 14 Posted April 15, 2015 Share Posted April 15, 2015 Remove the line if table not egal nil Link to comment Share on other sites More sharing options...
Premium MrLibya 554 Posted April 15, 2015 Author Premium Share Posted April 15, 2015 i will try If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
Premium MrLibya 554 Posted April 15, 2015 Author Premium Share Posted April 15, 2015 (edited) same btw to know the error is the table got nil , i said that cant find it i wrong about it sry https://metin2.download/picture/g0GN2pu5yAtVI7rx5dZu94kQItl3Fn47/.png Edited August 30, 2022 by Metin2 Dev Core X - External 2 Internal If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
FakedMan 14 Posted April 15, 2015 Share Posted April 15, 2015 Give us your full quest it's will be more easy xD Link to comment Share on other sites More sharing options...
Premium MrLibya 554 Posted April 16, 2015 Author Premium Share Posted April 16, 2015 it's not need for this i only give the function load and this is the import If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
FakedMan 14 Posted April 16, 2015 Share Posted April 16, 2015 Up to you if you don't want we help you Link to comment Share on other sites More sharing options...
Premium Solution MrLibya 554 Posted April 16, 2015 Author Premium Solution Share Posted April 16, 2015 Fixed Thx To Marty The Error that i include the local inside if If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now