String parse into frame names
Hi,
How would i parse this into proper condition? Code:
local condition |
You can use gsub to do the replacement
Lua Code:
|
Thank you .. but it doesn't go thru if...
It is not considered as "FRAME and FRAME" but "string with spaces" if you know what i mean. i ended up doing this... this seems to be working lua Code:
I'm faaaaar from lua developer.. I'm struggling a lot... so if anyone have better solution I'm game :) |
If you are talking about strings with just a bunch of spaces in you could used ( strtrim(string[, chars]) - Trim leading and trailing spaces or the characters passed to chars from string. ) and then check to see if it is an empty string.
I got that from this page : https://wowpedia.fandom.com/wiki/Lua...ring_Functions |
If the string is valid Lua syntax, you can run it through loadstring().
Code:
loadstring("return frame1 and frame2 or frame3")(); |
Thank you all kindly
|
All times are GMT -6. The time now is 08:05 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI