Jump to content

String problem


Piorun

Recommended Posts

Hi guys!

I have problem with my string. I have something like this: "1,2,3,4" and i want to get every number from this string (meybe into table?).

I just want to create some fraction system. I have in my MySQL table some row named "members" and in it i have this values "1,2,3,4". I want to check if any player is in fraction (numbers are the ids of the characters). Please, help.

Link to comment
I have problem with my string. I have something like this: "1,2,3,4" and i want to get every number from this string (meybe into table?)
str = '1,2,3,4' 
table = split(str, string.byte(',')) 

table contains your every character separated by comma in that string.

example: table[1] = '1'

And if you want to convert from string to number use the function tonumber(str)

Link to comment
I have problem with my string. I have something like this: "1,2,3,4" and i want to get every number from this string (meybe into table?)
str = '1,2,3,4' 
table = split(str, string.byte(',')) 

table contains your every character separated by comma in that string.

example: table[1] = '1'

And if you want to convert from string to number use the function tonumber(str)

Spam. I solved it.

Link to comment
I have problem with my string. I have something like this: "1,2,3,4" and i want to get every number from this string (meybe into table?)
str = '1,2,3,4' 
table = split(str, string.byte(',')) 

table contains your every character separated by comma in that string.

example: table[1] = '1'

And if you want to convert from string to number use the function tonumber(str)

Spam. I solved it.

You edited your freaking post so I didn't know.. Don't call mine a spam then.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...