Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

LUA Programming, definition of %

Posted on 2012-08-20
8
Medium Priority
?
570 Views
Last Modified: 2012-08-26
I'm unable to find in the Lua 5.1 Reference Manual a full definition of the % character. It only states the modulo math operator but nothing else that I can see. Usage is made further in to show such as %a within strings but it is not defined. In my case I want to know what %=function()% means. Can anyone point me to a more complete reference please?
0
Comment
Question by:keithath
  • 5
  • 3
8 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 38312220
For the "%a", see:  http://www.lua.org/manual/5.1/manual.html#5.4  These are format and pattern placeholders, and you use these when performing string manipulations and matching.

Can you provide an example for "%=function%" to give some context to that code?
0
 

Author Comment

by:keithath
ID: 38312658
[logic]
 active = sr_idle@wait

[sr_idle@wait]
on_info = {=actor_has_item(book)} nil %=create_squad(dar_monolit_squad:dar_monolit_smart_terrain)%


This is the content of a .ltx stalker game file. Perhaps it isn't true LUA?
0
 

Author Comment

by:keithath
ID: 38312744
The more I think about it, now I've put a question in, this isn't LUA at all is it? I've been working with the .script files which are LUA and got stuck with a reference to this file from elsewhere in the game files. Any clues what language if any this belongs to?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 38313094
I cannot research the issue at present, but I can look into it later this afternoon. I am not familiar with the game or the file type.
0
 

Author Comment

by:keithath
ID: 38315262
These files belong to the 3 "Stalker Shadow of Chernobyl" games owned by GSC.
The editable game files are mainly .script , .xml and .ltx
The .script is LUA, and the .xml game data.
The .ltx files are ansi text files of the format:-
[header1]
some text
some more
text...
[header2]
text

Some of the lines contain statements such as the one I refer to.
I naively thought the statement was part of LUA.
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 38315868
I didn't find any reference (in what I could find) showing that the .ltx files were LUA. There are a couple of articles discussing how to edit the files, but they don't really describe the language so much as they describe one or two specific mods. The only thing I could suggest at this point would be to try one of the (seemingly few) forums which deals specifically with such mods.
0
 

Accepted Solution

by:
keithath earned 0 total points
ID: 38315970
Not to worry, I'm a member of one of them so I guess I'll have to post a direct question. Having volunteered to edit a specific part of a mod it will feel like saying “I’ll build you a new car, er hum by the way, how I do it?"

I found the nearest i'm likely to get to an answer at http://www.gsc-game.com/index.php?t=community&s=forums&s_game_type=xr&thm_page=41&thm_id=19369&sec_id=16
0
 

Author Closing Comment

by:keithath
ID: 38333778
The stupid web form makes me fill this box in.
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algor…
As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month11 days, 2 hours left to enroll

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question