![]() |
|
King`s Bounty: Warriors of the North Next game in the award-winning King’s Bounty series |
![]() |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]()
I ask the question for certain person .
He is developing a mod . http://forum.1cpublishing.eu/showthread.php?t=36243 But he encountered a error (attached pic) and a messenger "msg_gold_is_found_01" in-game.Does anyone know how to fix the error and can the chests.lua code be improved ? For i can't find WotN's mod sub-forum, so i open the thread here and there seems to higher popularity here. ![]() Btw,the mod refers to a previous mod here but i don't know that original mod's name. Last edited by skycrow; 12-03-2012 at 07:36 PM. |
#2
|
|||
|
|||
![]()
Without the code we can't help you. The message is clear, there are an error on line 85, now without the function...
![]() |
#3
|
|||
|
|||
![]() Quote:
He seemed to mention he wrote the chests.lua in the mod with boxes.lua and addon_pet.lua . Is the problem as simple as what you replied ?Ok ,i will tell him.Thx. Last edited by skycrow; 12-03-2012 at 07:48 PM. |
#4
|
|||
|
|||
![]()
Simple ? Certainly not !
The problem occur in : function gen_object_in_box_name(par) -- äîñòóïíû ïåðåìåííûå: -- object - òýã ïðåäìåòà -- count - êîëè÷åñòâî âçÿòîãî -- image local cs = Logic.cur_lu_var("count") local count = 0 if cs ~= nil then count = tonumber( "0" .. cs ) end if par == "image" then return "<imb=" .. Logic.cur_lu_var("image") .. ">" --<br><label=itm_"..Logic.cur_lu_var("object").."_na me>: "..tostring(count) end if par == "name" then if count > 1 then return "<label=itm_"..Logic.cur_lu_var("object").."_name> : "..tostring(count) else return "<label=itm_"..Logic.cur_lu_var("object").."_name> " end end if count > 1 then return "<br><imb=" .. Logic.cur_lu_var("image") .. "><br><label=itm_"..Logic.cur_lu_var("object").."_ name>: "..tostring(count) else return "<br><imb=" .. Logic.cur_lu_var("image") .. "><br><label=itm_"..Logic.cur_lu_var("object").."_ name>" end end But he don't change this file, it's called from somewhere in his mod, and he must find where. |
#5
|
|||
|
|||
![]()
Saroumana,thanks for your explanation.
I seem to find the question ,and now i want to know whether it can be answered or modified if anyone can reply again. The mod has a purpose to get random items form dug chests in battlefield by mixing boxes.lua with addon_pet.lua ,but it seems to the mod that random items will cause certain error. Reference to this thread: http://forum.1cpublishing.eu/showthr...406#post126406 Is it impossible to safely let dug chests in battlefield generate random items due to some internal codes we can't modify ? Last edited by skycrow; 12-05-2012 at 05:53 AM. |
#6
|
|||
|
|||
![]()
It crash at this line :
return "<br><imb=" .. Logic.cur_lu_var("image") .. "><br><label=itm_"..Logic.cur_lu_var("object") .."_ name>" Which mean some value are missing. Whether : -image -object (unlikely) -name I guest some objects (item ?) don't have the image field filled. |
![]() |
|
|