Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[SOLVED MYSELF] How do I detect what line text is on?

Asked by 3 years ago
Edited 3 years ago

Alright so I have a trello card and I can get the description by using Trello:GetDesc() but what I need to figure out what line of the description the text is on. So the idea is there are two lines, one is the players rank one is the players username

How would I get line 1 and line 2 separately and how would I tell them apart? Any information helps.

EDIT:

I think I've done it using string.split()

local Card = Title      
local Str = Card:GetDesc()
local StrTable = Str:split(":")

for i,v in pairs(StrTable) do

local NewTitleText = ""..i
local NewRankText = ""..v

local Frame = ui.Frame
Frame.TitleText.Text = NewTitleText     
Frame.RankText.Text = NewRankText

However i is showing as "2" when it should be my username "TommyHArden" the trello card is formatted exactly like this "TommyHArden:Owner" without the speech marks

0
0
How would I get the second value? NewTitleText = v NewRankText = v (but the second) TommyHArden 101 — 3y
0
Nvm, figured it out and I feel kinda dumb. It should've been NewTitleText = StrTable[1] or 2 TommyHArden 101 — 3y

Answer this question