ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Finding all sections via script.

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  23:12:06  5 September 2013
profilee-mailreply Message URLTo the Top
TKGP
Senior Resident
 

 
On forum: 01/25/2013
Messages: 454
Finding all sections via script.

I'm wondering if there's a way to get all config sections without already knowing their names. Of course I could just brute force section_exist but that's not exactly scalable (to put it mildly), and as I understand it r_line only works within a section you've already defined. So, is this possible without resorting to external utilities to scrape the ltxs? The end goal is to spawn every existing item.
  15:30:50  7 September 2013
profilee-mailreply Message URLTo the Top
Vintar
a bit of this and a lot of that
(Resident)

 

 
On forum: 08/08/2008
Messages: 6349
I would imagine system_ini() has that info
  19:00:03  7 September 2013
profilee-mailreply Message URLTo the Top
TKGP
Senior Resident
 

 
On forum: 01/25/2013
Messages: 454

---QUOTATION---
I would imagine system_ini() has that info
---END QUOTATION---



As far as I can tell, system_ini() is just a shortcut for ini_file( "system.ltx" ). And there's nothing in lua_help for class ini_file that would return every section or even allow me to parse the whole system (because r_line only works within a section).
 
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.