Wildcard Question

Place to get help with not working mods / modding interface.
TheSAguy
Smart Inserter
Smart Inserter
Posts: 1456
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

Wildcard Question

Post by TheSAguy »

Hi,

How do I use wildcards to identify a name?

The name starts with "bio-" and ends with "-1"
So I want to do something like:

Code: Select all

if entity.valid and entity.name == "bio-"..*.."-1" then
Where * can be anything.

Thanks,
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: Wildcard Question

Post by Deadlock989 »

Google the Lua manual for pattern matching.
Post Reply

Return to “Modding help”