ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Script Works but counter is not printed...

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  18:57:05  9 April 2014
profilee-mailreply Message URLTo the Top
insanelazarez
Yeah, Good Luck With That...
(Resident)

 

 
On forum: 01/31/2009
 

Message edited by:
insanelazarez
04/09/2014 19:00:25
Messages: 1070
Script Works but counter is not printed...

[link]

http://prntscr.com/38fnnc


[/link]

Hi guys, i am removing some thing from my game and the functions work well, but i cant see the counter value to show up in console...


The Function (xr_effects.script)


---QUOTATION---



function inc_counter_items_removed(actor, npc)
local actor = db.actor
if actor then
xr_logic.pstor_store(actor, "counter_items_removed", xr_logic.pstor_retrieve(actor, "counter_items_removed", 0) + 1)

get_console():execute("Number_Of_Items_removed="..tostring(counter_items_removed).." => "
end

end




---END QUOTATION---




Better on pastebin:

[link]

http://pastebin.com/xvGiuAfh

[/link]


So any idea how to solve this?

Thanks in advance
  19:05:26  9 April 2014
profilee-mailreply Message URLTo the Top
Vintar
a bit of this and a lot of that
(Resident)

 

 
On forum: 08/08/2008
Messages: 6349

---QUOTATION---
Script Works but counter is not printed...

[link]

http://prntscr.com/38fnnc


[/link]

Hi guys, i am removing some thing from my game and the functions work well, but i cant see the counter value to show up in console...


The Function (xr_effects.script)




function inc_counter_items_removed(actor, npc)
local actor = db.actor
if actor then
xr_logic.pstor_store(actor, "counter_items_removed", xr_logic.pstor_retrieve(actor, "counter_items_removed", 0) + 1)

get_console():execute("Number_Of_Items_removed="..tostring(counter_items_removed).." => "
end

end






Better on pastebin:

[link]

http://pastebin.com/xvGiuAfh

[/link]


So any idea how to solve this?

Thanks in advance
---END QUOTATION---




get_console():execute("Number_Of_Items_removed=[%s]",tostring(counter_items_removed))

  19:21:54  9 April 2014
profilee-mailreply Message URLTo the Top
insanelazarez
Yeah, Good Luck With That...
(Resident)

 

 
On forum: 01/31/2009
Messages: 1070

---QUOTATION---


get_console():execute("Number_Of_Items_removed=[%s]",tostring(counter_items_removed))


---END QUOTATION---



Sorry Vintar, but not working yet...

[link]

http://prntscr.com/38fyib

[/link]


We are close... But... its some syntax issue for sure.
  19:30:51  9 April 2014
profilee-mailreply Message URLTo the Top
TKGP
Senior Resident
 

 
On forum: 01/25/2013
 

Message edited by:
TKGP
04/09/2014 19:34:08
Messages: 454
In your call to get_console():execute, counter_items_removed simply refers to a script variable which does not exist, so its value is nil. The string "counter_items_removed" only has significance in the context of the pstor functions. You need to either store the value somewhere or call pstor_retrieve again. For instance, like this:

local removedCount = xr_logic.pstor_retrieve( actor, "counter_items_removed", 0 ) + 1
xr_logic.pstor_store( actor, "counter_items_removed", removedCount )
get_console():execute( "Number_Of_Items_removed="..tostring( removedCount ) )

  19:45:49  9 April 2014
profilee-mailreply Message URLTo the Top
insanelazarez
Yeah, Good Luck With That...
(Resident)

 

 
On forum: 01/31/2009
Messages: 1070
Lol... One Shot... 409 Kills

[link]

http://prntscr.com/38g6kh

[/link]


Thanks TKGP, it's perfect. Good job mate.
  20:34:36  9 April 2014
profilee-mailreply Message URLTo the Top
exostalker
Novice fashion designer since 2008
(Resident)

 

 
On forum: 08/10/2009
Messages: 1267
A little bit offtopic, but...

hey insanelazarez, how's it going? Are you still working on the same project, or is this for something new?
  21:04:46  9 April 2014
profilee-mailreply Message URLTo the Top
insanelazarez
Yeah, Good Luck With That...
(Resident)

 

 
On forum: 01/31/2009
Messages: 1070

---QUOTATION---
A little bit offtopic, but...

hey insanelazarez, how's it going? Are you still working on the same project, or is this for something new?
---END QUOTATION---




Well, when i have the time to create mods (stalker, payday2, l4d2, etc) i like to create unique features. Right now i am sending a non-hostile bandit (still an enemy), to clear the outpost. He spawns in Sid's bunker, and he faces the biggest threat of all... the rookies with a shotgun. Usually wolf is the second loner to die. But once close of the outpost, it's like 1 shot one kill. Once the 16 soldiers are down, he disables the megaphone and he disables the 2 outpost military smart terrains. No more Respawn Bullshit in there. Now i added the first two elements for his squad... 1 bandit sniper and 1 bandit commander. Before i create new ones, i need to release the explosive mines first.


Btw, i expect to release this soon...
 
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-2022 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.