|
| 12 Mar 2016 12:56 AM |
How would I detect if a word is within a word?
Example:
How would I use an if statement to detect is "Armor" is in the name of an object (such as "Iron Armor")?
~MightyDantheman |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 12 Mar 2016 12:57 AM |
string = "IronArmor word = "Armor"
if string:find(word) then print("found word") end
|
|
|
| Report Abuse |
|
|
| |
|