Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > King's Bounty > King`s Bounty: Warriors of the North

King`s Bounty: Warriors of the North Next game in the award-winning King’s Bounty series

Reply
 
Thread Tools Display Modes
  #1  
Old 12-03-2012, 05:34 PM
skycrow skycrow is offline
Approved Member
 
Join Date: Aug 2012
Posts: 44
Default mod code question

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.
Attached Images
File Type: jpg ad7b3cdbb6fd5266e44471fdab18972bd507361f.jpg (13.4 KB, 19 views)

Last edited by skycrow; 12-03-2012 at 07:36 PM.
Reply With Quote
  #2  
Old 12-03-2012, 07:11 PM
saroumana saroumana is offline
Approved Member
 
Join Date: Jan 2010
Posts: 87
Default

Without the code we can't help you. The message is clear, there are an error on line 85, now without the function...
Reply With Quote
  #3  
Old 12-03-2012, 07:22 PM
skycrow skycrow is offline
Approved Member
 
Join Date: Aug 2012
Posts: 44
Default

Quote:
Originally Posted by saroumana View Post
Without the code we can't help you. The message is clear, there are an error on line 85, now without the function...
I guess the error should occur in chests.lua in the mod .

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.
Attached Files
File Type: zip medals_treasure_searcher(standard).zip (150.7 KB, 11 views)

Last edited by skycrow; 12-03-2012 at 07:48 PM.
Reply With Quote
  #4  
Old 12-03-2012, 09:18 PM
saroumana saroumana is offline
Approved Member
 
Join Date: Jan 2010
Posts: 87
Default

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.
Reply With Quote
  #5  
Old 12-05-2012, 05:38 AM
skycrow skycrow is offline
Approved Member
 
Join Date: Aug 2012
Posts: 44
Default

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.
Reply With Quote
  #6  
Old 12-05-2012, 05:54 PM
saroumana saroumana is offline
Approved Member
 
Join Date: Jan 2010
Posts: 87
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:32 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.