|
| 08 May 2015 04:55 AM |
How would I get the rank number out of that? That's what HttpService returned.
255 of course can be any rank.
The slashes are in parentheses as Roblox otherwise would go weird lol |
|
|
| Report Abuse |
|
|
|
| 08 May 2015 05:05 AM |
local Found1 = 0 for i=1, #string do if string:sub(i,i) == ">" then Found1 = i break end
for i=Found1, #string do if string:sub(i,i) == "<" then string = string:sub(Found1, i-1) break end |
|
|
| Report Abuse |
|
|
|
| 08 May 2015 05:06 AM |
| I'm sure the others are going to come along and use string patterns.. I just don't understand them. |
|
|
| Report Abuse |
|
|
|
| 08 May 2015 05:07 AM |
rank = rank:sub(rank:find("integer") + 9, rank:find("/Value") - 2)
I feel so inefficient xd |
|
|
| Report Abuse |
|
|
| |
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 08 May 2015 05:38 AM |
http://codepad.org/OMGPuiFy
Roblox is being a noob :(
I script -~ chimmihc |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 08 May 2015 05:39 AM |
lol just notices OMG is in the url.
I script -~ chimmihc |
|
|
| Report Abuse |
|
|
|
| 08 May 2015 06:39 AM |
| Well, mine does the same and is shorter than both of urs ;3 |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 08 May 2015 06:44 AM |
It is very dependent.
In this case they all do the same thing.
I script -~ chimmihc |
|
|
| Report Abuse |
|
|
gskw
|
  |
| Joined: 05 Jan 2013 |
| Total Posts: 1364 |
|
|
| 08 May 2015 07:05 AM |
Those are both inefficient IMO, just do: str:match("%d+")
This is a signature. Recommended username: WetGskw |
|
|
| Report Abuse |
|
|
|
| 08 May 2015 07:07 AM |
| Could you explain what that does? |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 08 May 2015 07:12 AM |
That just matches digits...
It works nothing like mine.
I script -~ chimmihc |
|
|
| Report Abuse |
|
|
gskw
|
  |
| Joined: 05 Jan 2013 |
| Total Posts: 1364 |
|
|
| 08 May 2015 07:25 AM |
Oh my Auto-Gen signature really hurt that time lol (And this one too, I'm totally not hollow)
This is a signature. Recommended username: HollowGskw |
|
|
| Report Abuse |
|
|
|
| 08 May 2015 09:23 AM |
| stackoverflow.com/questions/1732348 |
|
|
| Report Abuse |
|
|
|
| 08 May 2015 09:56 AM |
local function GetContent(Tag) local Content = Tag:match("<.+>(.+)<\/.+>") return Content end
or
rank = rank:match("<.+>(.+)<\/.+>")
------------------------------------
just whatever you think will be best to use
what to heck |
|
|
| Report Abuse |
|
|
|
| 08 May 2015 09:58 AM |
I also noticed the "Content" variable was unneeded, but I just like being organized when it's not needed or sometimes not even really clean, sorry.
what to heck |
|
|
| Report Abuse |
|
|