|
| 04 Jun 2016 02:32 PM |
So uh, I've been using sub to make them, but I know there's more efficient methods of doing so. And uh, I'm starting to confuse myself here because of this sub thing. I heard string patterns are good, but I really don't know how to use them..
if Message:sub(1, 5 + #Settings.Bet):lower() == ("Music"..Settings.Bet):lower() then if Message:sub(6 + #Settings.Bet, #Message):lower() == ("Stop"):lower() then GameMusic:Stop() elseif Message:sub(6 + #Settings.Bet, 6 + #Settings.Bet + 6 + #Settings.Bet):lower() == ("Volume"..Settings.Bet):lower() then GameMusic.Volume = tonumber(Message:sub(6 + #Settings.Bet + 6 + #Settings.Bet, #Message)) end end
-=[ RAP: 297,601 || DurstAuric; the narb of ROBLOX ]=- |
|
|
| Report Abuse |
|
|
|
| 04 Jun 2016 02:36 PM |
Bump..
-=[ RAP: 297,611 || DurstAuric; the narb of ROBLOX ]=- |
|
|
| Report Abuse |
|
|
|
| 04 Jun 2016 02:46 PM |
Another bump.
-=[ RAP: 297,587 || DurstAuric; the narb of ROBLOX ]=- |
|
|
| Report Abuse |
|
|
|
| 04 Jun 2016 03:11 PM |
Last bump.
-=[ RAP: 297,614 || DurstAuric; the narb of ROBLOX ]=- |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 04 Jun 2016 03:12 PM |
organize it into functions and then just call the functions based on the command
|
|
|
| Report Abuse |
|
|
|
| 04 Jun 2016 03:15 PM |
I have functions, but I really despise using sub. I need a more efficient way than sub.
-=[ RAP: 297,614 || DurstAuric; the narb of ROBLOX ]=- |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
| |
|
|
| 04 Jun 2016 03:18 PM |
Okay.. Any examples?
-=[ RAP: 297,615 || DurstAuric; the narb of ROBLOX ]=- |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 04 Jun 2016 03:23 PM |
local prefix = ":"
msg = ":hi"
if msg:find(prefix) then
for example
|
|
|
| Report Abuse |
|
|
|
| 04 Jun 2016 03:24 PM |
http://wiki.roblox.com/index.php?title=String_pattern
nothin' like a good argument |
|
|
| Report Abuse |
|
|
|
| 04 Jun 2016 07:08 PM |
I need to learn how to use string patterns because that wiki article is confusing.. This doesn't work..
for Match in Message:gmatch("%Music"):lower() do print(Match) end
-=[ RAP: 298,129 || DurstAuric; the narb of ROBLOX ]=- |
|
|
| Report Abuse |
|
|