• Hail Guest!
    We're looking for Community Content Contribuitors to Stratics. If you would like to write articles, fan fiction, do guild or shard event recaps, it's simple. Find out how in this thread: Community Contributions
  • Greetings Guest, Having Login Issues? Check this thread!
  • Hail Guest!,
    Please take a moment to read this post reminding you all of the importance of Account Security.
  • Hail Guest!
    Please read the new announcement concerning the upcoming addition to Stratics. You can find the announcement Here!

[Tech Help] How do you write an OR statement when you write Mods?

G.v.P

Stratics Legend
Stratics Veteran
Stratics Legend
Hi guys I'm editing the Item Properties Evaluator so it doesn't show mods for Spellbooks and the like and was wondering how you can write an OR statement (If A = B or A = C then X = Y).

I was thinking I could use ||, like for example this works for one string:

if wstring.find(title, L"spellbook") then
ItemPropertiesEvaluator.ItemType = ItemPropertiesEvaluator.TYPE_SKIP
return
end

And I thought I could add before "then":

|| wstring.find(title, L"scrapper's compendium")

But it doesn't work so was wondering what the code is for an OR operator.

Also, what's the best format to save in if you run notepad? ANSI, Unicode, Unicode big endian, or UTF-8? I know you have to save as .LUA, but was just curious if one encoding was preferred by modders (for basic HTML I always use UTF-8).

Thanks!
 

Gildar

Babbling Loonie
Stratics Veteran
Stratics Legend
if wstring.find(title, L"spellbook") or wstring.find(title, L"scrapper's compendium") then


I try to use || instead of or all the time :)
 

G.v.P

Stratics Legend
Stratics Veteran
Stratics Legend
:O so all you have to write is or ... wow, that's simple enough! lol thank you Gildar :)
 
Top