LUA Programming, definition of %

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?
keithathAsked:
Who is Participating?
 
keithathAuthor Commented:
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
 
käµfm³d 👽Commented:
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
 
keithathAuthor Commented:
[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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
keithathAuthor Commented:
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
 
käµfm³d 👽Commented:
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
 
keithathAuthor Commented:
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
 
käµfm³d 👽Commented:
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
 
keithathAuthor Commented:
The stupid web form makes me fill this box in.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.