generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Strange results on string manipulation

Previous Thread :: Next Thread 
iSpecializinq is not online. iSpecializinq
Joined: 31 May 2015
Total Posts: 2182
26 Jun 2015 12:46 PM
This doesn't work:

Plr.Chatted:connect(function(Message)
if SplitString(Message,"%s")[1]:lower() == Prefix.."kill " then
local Players = FindPlayer(Plr,SplitString(Message,"%s")[2])
for i = 1,#Players do
Players[i].Character:BreakJoints()
end
end
end)

Yet this does:

Plr.Chatted:connect(function(Message)
if Message:sub(1,5+#Prefix):lower() == Prefix.."kill " then
local Players = FindPlayer(Plr,SplitString(Message,"%s")[2])
for i = 1,#Players do
Players[i].Character:BreakJoints()
end
end
end)


Split string function:

local function SplitString(InputString,Seperator)
if Seperator == nil then
Seperator = "%s"
end
local Table = {}
local Num = 1
for String in string.gmatch(InputString,"([^"..Seperator.."]+)") do
Table[Num] = String
Num = Num + 1
end
return Table
end
Report Abuse
iSpecializinq is not online. iSpecializinq
Joined: 31 May 2015
Total Posts: 2182
26 Jun 2015 04:39 PM
b1
Report Abuse
iSpecializinq is not online. iSpecializinq
Joined: 31 May 2015
Total Posts: 2182
27 Jun 2015 01:10 PM
bump
Report Abuse
EchoEndlessly is not online. EchoEndlessly
Joined: 26 May 2015
Total Posts: 345
27 Jun 2015 01:12 PM
are you expecting us to fix it or something


find the error
Report Abuse
iSpecializinq is not online. iSpecializinq
Joined: 31 May 2015
Total Posts: 2182
27 Jun 2015 01:13 PM
there is no error, but thanks captain obvious

now get out
Report Abuse
EchoEndlessly is not online. EchoEndlessly
Joined: 26 May 2015
Total Posts: 345
27 Jun 2015 01:15 PM
you get out dumbass idiot dummy
Report Abuse
BobserLuck is not online. BobserLuck
Joined: 09 Mar 2012
Total Posts: 653
27 Jun 2015 01:17 PM
Hey Echo, this is a scripting forum and if you look around... everybody is looking for help. So, instead of causing more problems, why not actually help instead of hinder.
Report Abuse
EchoEndlessly is not online. EchoEndlessly
Joined: 26 May 2015
Total Posts: 345
27 Jun 2015 01:18 PM
stfu idiot


I posted this:

"are you expecting us to fix it or something


find the error"


which implies that he should point out the error if he want his ugly script fixed

who r u anyway? don't tell me what to do noob
Report Abuse
iSpecializinq is not online. iSpecializinq
Joined: 31 May 2015
Total Posts: 2182
27 Jun 2015 01:21 PM
I TOLD YOU IT DOESNT ERROR SO SHUTUP
YOUR A FAT TROLL


omfg man I am NOT in the mood! My grandma just died and im just lookin' for a fight.
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
27 Jun 2015 01:21 PM
Get out Echo
Report Abuse
EchoEndlessly is not online. EchoEndlessly
Joined: 26 May 2015
Total Posts: 345
27 Jun 2015 01:22 PM
get out cody
Report Abuse
EchoingEndlessly is not online. EchoingEndlessly
Joined: 13 Aug 2009
Total Posts: 6231
27 Jun 2015 01:24 PM
"omfg man I am NOT in the mood! My grandma just died and im just lookin' for a fight."

lmao
Report Abuse
iSpecializinq is not online. iSpecializinq
Joined: 31 May 2015
Total Posts: 2182
27 Jun 2015 01:24 PM
@Echo

GET OUT
GET OUT
GET OUT
GET OUT
GET OUT
GET OUT
GET OUT
GET OUT
GET OUT
GET OUT
GET OUT
GET OUT
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
27 Jun 2015 01:25 PM
Try this method.

local Split = function(in, delim)
local out = {}

for v in string.gmatch("[^"..delim.."]+")do
table.insert(out, v)
end

return out
end

print(Split("Apple", "pp")[1]) --> a
print(Split("Apple", "pp")[2]) --> le
print(Split("Apple", ".p")[2]) --> le


You shouldn't try putting in special characters if you don't need to.
Report Abuse
BobserLuck is not online. BobserLuck
Joined: 09 Mar 2012
Total Posts: 653
27 Jun 2015 01:26 PM
@iSpecializinq, take a break from social media of any sorts until you can pull yourself back together from the trauma. I'm not trying to be mean or demanding, just trying to give some advice that would probably help you out allot in this situation.

@Echo, please look at your join date, and then look at mine. Now tell me how you can call me a noob when I have been at this allot longer than you mister 1 month. Second off, when I said hinder, I meant cussing people out like that. That is only going to cause fights and is not very becoming of you.
Report Abuse
EchoingEndlessly is not online. EchoingEndlessly
Joined: 13 Aug 2009
Total Posts: 6231
27 Jun 2015 01:28 PM
@Bobser, please look at your join date, and then look at mine. Now tell me how you can call me a noob when I have been at this allot longer than you mister 1 month.
Report Abuse
iSpecializinq is not online. iSpecializinq
Joined: 31 May 2015
Total Posts: 2182
27 Jun 2015 01:28 PM
WHY SHOULD I
I CAN PLAY TOO
Report Abuse
vacha is not online. vacha
Joined: 06 Jan 2011
Total Posts: 1993
27 Jun 2015 01:29 PM
stop harrasing my friend u nubs

while true do the do
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
27 Jun 2015 01:30 PM
allot is the incorrect spelling.

Use a lot.

@all
I'm surprised that echo told me to get out back.
He should know that I am a dedicated helper who has been here for 6 years and he is a new guy.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
27 Jun 2015 01:32 PM
@iSpec you are proving that he has gotten inside your head. Don't let his idiocy affect you. Reacting to such a pathetic person won't do you any good. So, take a chill pill and relax dude.

@Echo, you are an embarrassment. Please save us all the trouble and kys.
Report Abuse
BobserLuck is not online. BobserLuck
Joined: 09 Mar 2012
Total Posts: 653
27 Jun 2015 01:33 PM
@EchoingEndlessly, wrong Echo XD.

@iSpecializinq, Like I said, you mite want to take a break and give yourself some time to chill. I am saying this not to be rude or mean, but to avoid people like Echo (other one) who mite just make a bad situation worse.
Report Abuse
EchoingEndlessly is not online. EchoingEndlessly
Joined: 13 Aug 2009
Total Posts: 6231
27 Jun 2015 01:33 PM
maybe he told you to get out because you told him to get out
Report Abuse
BobserLuck is not online. BobserLuck
Joined: 09 Mar 2012
Total Posts: 653
27 Jun 2015 01:36 PM
Nope, I never said anything of the sort. I mite have said something that could have been taken as such but that was not my intent.
Report Abuse
EchoEndlessly is not online. EchoEndlessly
Joined: 26 May 2015
Total Posts: 345
27 Jun 2015 01:36 PM
@TimeTicks get out

@bobser lrn2spell
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
27 Jun 2015 01:39 PM
All might Echo is here to tell us our place.

Good think he is senpai or else we dunno wat to dew!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image