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 » Scripting Helpers
Home Search
 

Re: So I'm trying to separate each letter from a string.

Previous Thread :: Next Thread 
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
20 Feb 2014 09:41 PM
If Input is "HelloThere" It prints 104, But I need it to put a number for each letter.

So my main question is, How do I separate each letter from the script?


input = ""
output = ""
letters = input
letters1 = string.lower(letters)
letters2 = string.byte(letters1)
output = letters2
print(letters2)
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
20 Feb 2014 09:49 PM
Well It sill doesnt Work. Still prints 104



input = "HelloThere"
output = ""
letters = input
letters1 = string.lower(letters)
letters2 = string.byte(letters1,1,string.len(letters1))
output = letters2
print(letters2)


Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
20 Feb 2014 09:55 PM
Okay I've changed it to this.. I really need some help!



input = "HelloThere"
output = ""
letters = input
letters1 = string.lower(letters)
letters2 = string.len(letters1)
letters3 = string.byte(letters1,1,tonumber(letters2))
output = letters3
print(letters1)
print(letters2)
print(letters3)

hellothere
10
104

Report Abuse
goluigi10 is not online. goluigi10
Joined: 28 May 2008
Total Posts: 3270
20 Feb 2014 10:00 PM
input = "Hello there!"
output = nil
letters1 = string.lower(input)
letters2 = string.len(input) --The length of string.lower(input) and input are the same.

print(letters1, letters2)
for i = 1, letters2 do
print(string.byte(string.sub(letters1,i-1,i))
end

Something like that?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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