Thread Tools Display Modes
Prev Previous Post   Next Post Next
10-01-22, 04:05 AM   #1
glupikreten
A Theradrim Guardian
Join Date: Apr 2009
Posts: 60
String parse into frame names

Hi,

How would i parse this into proper condition?

Code:
local condition
line = 'frame1 and frame2 or frame3'

for token in string.gmatch(line, "[^%s]+") do

   if token == "and" or token == "or" then 
      token = token.." "
   else 
      token = '_G['..token..'] '
   end
   condition =  condition .. token
end
Thank you

Last edited by glupikreten : 10-01-22 at 04:20 AM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » String parse into frame names


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off