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: String manipulation help

Previous Thread :: Next Thread 
DemonizedOverIord is not online. DemonizedOverIord
Joined: 08 Jan 2012
Total Posts: 2871
10 Sep 2017 09:20 PM
How could I get a script to separate words in a text box by a space, and turn the ### different words into separate arguments? For example, if the textbox's text is "Hi there" then the script would turn the word "Hi" into one argument and turn the word "there" into another argument forums:FindFirstChild("Let's Make a Deal"):Destroy()
Report Abuse
DemonizedOverIord is not online. DemonizedOverIord
Joined: 08 Jan 2012
Total Posts: 2871
10 Sep 2017 09:22 PM
Thanks a lot roblox..


I appreciate it.



forums:FindFirstChild("Let's Make a Deal"):Destroy()
Report Abuse
kylerzong is not online. kylerzong
Joined: 06 Aug 2011
Total Posts: 659
10 Sep 2017 09:25 PM
so separating the words?




Like "My Name Is Joe" Would Be Turned Into A Table


print(table[1]) -- Output: "My"
print(table[2]) -- Output: "Name"
print(table[3]) -- Output: "Is"


???
Report Abuse
DemonizedOverIord is not online. DemonizedOverIord
Joined: 08 Jan 2012
Total Posts: 2871
10 Sep 2017 09:26 PM
Pretty much. Someone showed me how to separate text by this simbol "|" but I want it to be a space and I searched all over the wiki on how to o it. local command, argument = string.match(testString, ##################### forums:FindFirstChild("Let's Make a Deal"):Destroy()
Report Abuse
DemonizedOverIord is not online. DemonizedOverIord
Joined: 08 Jan 2012
Total Posts: 2871
10 Sep 2017 09:29 PM
######### /v1qWj61X forums:FindFirstChild("Let's Make a Deal"):Destroy()
Report Abuse
kylerzong is not online. kylerzong
Joined: 06 Aug 2011
Total Posts: 659
10 Sep 2017 09:30 PM
local module = ################### ## I made a module for you -- to use it do: string = "Hey My Name Is Joe" -- the first argument is the character separating the words, the second is the string local words = module:parse(" ",string) for I,v in pairs(words) do print(v) end OUTPUT: My Name Is Joe
Report Abuse
DemonizedOverIord is not online. DemonizedOverIord
Joined: 08 Jan 2012
Total Posts: 2871
10 Sep 2017 09:30 PM
Wow, its nice that roblox makes sure I can't get help.

payste been^^



forums:FindFirstChild("Let's Make a Deal"):Destroy()
Report Abuse
DemonizedOverIord is not online. DemonizedOverIord
Joined: 08 Jan 2012
Total Posts: 2871
10 Sep 2017 09:31 PM
Make a ######## thing. Roblox is going to make sure that any way of helping me is blocked forums:FindFirstChild("Let's Make a Deal"):Destroy()
Report Abuse
kylerzong is not online. kylerzong
Joined: 06 Aug 2011
Total Posts: 659
10 Sep 2017 09:33 PM
payhstebeen daught calm /M0zY5h8j
Report Abuse
DemonizedOverIord is not online. DemonizedOverIord
Joined: 08 Jan 2012
Total Posts: 2871
10 Sep 2017 09:34 PM
Ty



forums:FindFirstChild("Let's Make a Deal"):Destroy()
Report Abuse
kylerzong is not online. kylerzong
Joined: 06 Aug 2011
Total Posts: 659
10 Sep 2017 09:35 PM
Does it work?
Report Abuse
DemonizedOverIord is not online. DemonizedOverIord
Joined: 08 Jan 2012
Total Posts: 2871
10 Sep 2017 09:36 PM
Testing it rn



forums:FindFirstChild("Let's Make a Deal"):Destroy()
Report Abuse
DemonizedOverIord is not online. DemonizedOverIord
Joined: 08 Jan 2012
Total Posts: 2871
10 Sep 2017 09:38 PM
19:37:57.820 - Unable to find module for asset id



forums:FindFirstChild("Let's Make a Deal"):Destroy()
Report Abuse
kylerzong is not online. kylerzong
Joined: 06 Aug 2011
Total Posts: 659
10 Sep 2017 09:39 PM
I made it along time ago for strings like "100,500"



Report Abuse
ExtremeBuilder15 is online. ExtremeBuilder15
Joined: 01 May 2012
Total Posts: 3176
10 Sep 2017 09:40 PM
Taken straight from the wiki:

local s = "hello world from Lua"
for w in string.gmatch(s, "%a+") do
print(w)
end

Report Abuse
kylerzong is not online. kylerzong
Joined: 06 Aug 2011
Total Posts: 659
10 Sep 2017 09:41 PM
It works for me, try changing string to zstring because string already exists
Report Abuse
kylerzong is not online. kylerzong
Joined: 06 Aug 2011
Total Posts: 659
10 Sep 2017 09:42 PM
might just need a while for roblox to catch up with the module since I just uploaded it
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