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: String question

Previous Thread :: Next Thread 
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
07 Aug 2011 02:18 PM
Whats the point of strings?I mean for example lets just say I do string.rep

a=string.rep ("Blarg, ", 4)
print(a)
Will result in
Blarg, Blarg, Blarg, Blarg,
Thats what I saw on wiki.

But whats the point of say that when you can just say

print("Blarg,Blarg,Blarg,Blarg,"
Report Abuse
hikk is not online. hikk
Joined: 15 Jan 2007
Total Posts: 13775
07 Aug 2011 02:20 PM
[ Content Deleted ]
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
07 Aug 2011 02:22 PM
string.rep() is only really for effects. Strings can be used for multiple things such as tournaments, easy saving, and basically anything you can imagine.



local a=Instance.new("Message",workspace);
local mesl="Hello miz, so you were wondering why strings were useful I hear? Maybe this would be helpful in some way or another I hope.";

for i=1,mesl:len() do
Wait(0.1);
a.Text=mesl:sub(i-10>0 and i-10 or 1, i);
end
Wait(2);
a:remove();
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
07 Aug 2011 02:23 PM
Little cofused?
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
07 Aug 2011 02:24 PM
Also you use strings 10x more than you think. Every time you use anything like .Name or print("Blarg,Blarg,Blarg,Blarg,") you're still using strings. You won't immediately be able to find a good use for all the string functions but trust me, later you will find them useful and you will see how many more doors it opens.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
07 Aug 2011 03:16 PM
Ok, so if your saying that for example .Name is a string what is that specific string called?
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
07 Aug 2011 03:17 PM
Whatever you catch it with.


a=workspace.miz656.Name

print(a)
print(a:rep(5))
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
07 Aug 2011 03:21 PM
I could of also said
print(Whatever I want)
print(ONce again whatever I want)

Can you give me another SIMPLE example why strings are important?
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
07 Aug 2011 03:25 PM
I've already told you, even just doing what you just said is USING strings. You can't avoid using strings for these situations. If you're questioning the point of string.rep(), it doesn't have any except for decoration pretty much.


local a=Instance.new("Message",workspace)
while Wait() do
for i=0,5 do
Wait(0.5)
a.Text=("*"):rep(i) .. " hola miz " .. ("*"):rep(i)
end
for i=5,0,-1 do
Wait(0.5)
a.Text=("*"):rep(i) .. " hola miz " .. ("*"):rep(i)
end end
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
07 Aug 2011 03:35 PM
That confuses me because I don't know why you put a multiplication sign but ok whatever.
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