ahmad 3 Report post Posted October 17, 2018 helo!~ every time i use Whirlpool skill appear some error inside lua error [10-17 00:51:46]DoString State_Xw_Add [10-17 00:51:46]./resource/script\calculate\functions.lua:655: attempt to perform arithmetic on a nil value [10-17 00:52:02]DoString State_Xw_Rem [10-17 00:52:02]./resource/script\calculate\functions.lua:655: attempt to perform arithmetic on a nil value this the function inside function.lua function Mspd(a) --LuaPrint("Obtain character attribute mspd") local mspd=GetChaAttr(a,ATTR_MSPD) --[[取mspd]]-- return mspd end function MspdSa(a) --LuaPrint("Obtain character attribute mspd_sa") local mspdsa= GetChaAttr(a, ATTR_STATEC_MSPD)/ATTR_RADIX --[[取mspd状态百分比]]-- return mspdsa end and this inside skilleff function Skill_Xw_End ( ATKER , DEFER , sklv ) end function State_Xw_Add ( role , statelv ) local mspdsa_dif = 0.1 + statelv * 0.02 local aspdsa_dif = 0.05 + statelv * 0.01 local mspdsa = ( MspdSa ( cha_role ) - mspdsa_dif ) * ATTR_RADIX local aspdsa = ( AspdSa ( cha_role ) - aspdsa_dif ) * ATTR_RADIX SetCharaAttr( mspdsa , role , ATTR_STATEC_MSPD ) SetCharaAttr( aspdsa , role , ATTR_STATEC_ASPD ) ALLExAttrSet( role ) end function State_Xw_Rem ( role , statelv ) local mspdsa_dif = 0.1 + statelv * 0.02 local aspdsa_dif = 0.05 + statelv * 0.01 local mspdsa = ( MspdSa ( cha_role ) + mspdsa_dif ) * ATTR_RADIX local aspdsa = ( AspdSa ( cha_role ) + aspdsa_dif ) * ATTR_RADIX SetCharaAttr( mspdsa , role , ATTR_STATEC_MSPD ) SetCharaAttr( aspdsa , role , ATTR_STATEC_ASPD ) ALLExAttrSet( role ) end function State_Xw_Tran ( statelv ) return 1 end skilinfo line 0218 Whirlpool 1 16,10 1,-1 1,-1 1,-1 -1 2 1 0 -1 217,4 1 2 2 1000 5 2 0 0 3 0 SkillArea_State_Xw SkillSp_Xw 0 0 SkillArea_Circle_Xw 0 Skill_Xw_End 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SkillCooldown_Xw 1 1 12 0 110 -1 278 0 0 247,0 0,0 -1 -1 -1 0 0 111 -1 0 0 279 0 s0218.tga 0 0 Creates a whirlpool to decrease movement speed of hostile ships within range Effect increases with each level Consumes 21 SP at Level 1. Increases by 1 SP per skill level 0 skilleff line 12 Whirlpool -1 State_Xw_Tran State_Xw_Add State_Xw_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 280 1 0 0 0 0 0 Quote Share this post Link to post Share on other sites
Knight 15 Report post Posted October 17, 2018 Give us functions.lua string #655 Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted October 17, 2018 Change the name of the variable 'cha_role' to 'role' in skilleff.lua Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
ahmad 3 Report post Posted October 18, 2018 13 hours ago, Knight said: Give us functions.lua string #655 line 655 it's local mspdsa= GetChaAttr(a, ATTR_STATEC_MSPD)/ATTR_RADIX --[[取mspd状态百分比]]-- 13 hours ago, V3ct0r said: Change the name of the variable 'cha_role' to 'role' in skilleff.lua didn't work have this error and this cha_role inside function.lua Quote Share this post Link to post Share on other sites
Rinor 59 Report post Posted October 18, 2018 @Ahmed change all cha_role to role Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted October 18, 2018 @Ahmed, change 'role' on the line 5837 to 'statelv' Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
ahmad 3 Report post Posted October 19, 2018 17 hours ago, V3ct0r said: @Ahmed, change 'role' on the line 5837 to 'statelv' work thank you Quote Share this post Link to post Share on other sites