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

Help With String Formatting?

Asked by 9 years ago

All right I'm trying to insert all the values between ':'s into a table. I'm not really sure how to explain it so here's an example of what I'm trying to achieve >>

local unformattedString = "Starter Sword:ohls:5:45:100:md"
--and after formatting it, it will become a table with all the data seperated
formattedtable = {"Starter Sword", "ohls", 5, 45, 100, "md"}

A couple problems that I'm thinking off. If you look in the string "Starter Sword", "ohls", and "md" aren't strings but after formatting them they are strings? I'm not sure how I would do that.

Again I'm not sure how I would grab the stuff between the lines, anything will help :)

0
What do you mean by 'If you look in the string "Starter Sword", "ohls", and "md" aren't strings but after formatting them they are strings?'? They're strings both at the beginning and in the table, although they're not separate strings. And what do you mean by 'grab the stuff between the lines'? Perci1 4988 — 9y
0
Like, I want to take what is between the :'s and turn it into a value in a table YellowoTide 1992 — 9y

Answer this question