ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
I need help with a script...

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  18:14:41  20 December 2012
profilee-mailreply Message URLTo the Top
insanelazarez
Yeah, Good Luck With That...
(Resident)

 

 
On forum: 01/31/2009
Messages: 1070
I need help with a script...

Hi, guys i am trying to send a tip with the name of any infoportion given by the game. I got some 'attempt to concatenate a nil value' error.

I know this is possible, but i have limitations with scripts.

Bind_stalker.script:


---QUOTATION---


local show_information = true--MY SWITCH HERE

function actor_binder:info_callback(npc, info_id)
printf("*INFO*: npc='%s' id='%s'", npc:name(), info_id)
--' Ñþæåò
level_tasks.proceed(self.object)
-- Îòìåòêè íà êàðòå
level_tasks.process_info_portion(info_id)
--STUFF STARTS HERE
if show_information then
local name = info_id.name
local text = ""
text = text.."\\n".. game.translate_string(name) ..": "..game.translate_string("THIS_INFO_WAS_GIVEN" .."!!"
news_manager.send_tip(db.actor, text, nil, "stalker", 10000)
end
--STUFF ENDS HERE
end

---END QUOTATION---




Any idea how to fix it?

Thanks in advance.
  18:24:22  20 December 2012
profilee-mailreply Message URLTo the Top
insanelazarez
Yeah, Good Luck With That...
(Resident)

 

 
On forum: 01/31/2009
Messages: 1070
Ok, instead of:

local name = info_id.name

i used this way:


local name = info_id

And it works. That's it. Thanks anyway.
  01:55:52  22 December 2012
profilee-mailreply Message URLTo the Top
Daemonion
All About Audio
(Resident)

 

 
On forum: 09/27/2011
Messages: 567

---QUOTATION---
Ok, instead of:

local name = info_id.name

i used this way:


local name = info_id

And it works. That's it. Thanks anyway.
---END QUOTATION---


You're welcome
 
Each word should be at least 3 characters long.
Search:    
Search conditions:    - spaces as AND    - spaces as OR   
 
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
 

All short dates are in Month-Day-Year format.


 

Copyright © 1995-2021 GSC Game World. All rights reserved.
This site is best viewed in Internet Explorer 4.xx and up and Javascript enabled. Webmaster.
Opera Software products are not supported.
If any problem concerning the site functioning under Opera Software appears apply
to Opera Software technical support service.