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
 

String

Previous Thread :: Next Thread 
ns001111 is not online. ns001111
Joined: 15 Jan 2011
Total Posts: 2849
27 Jul 2011 07:01 AM
How do you add something to a string?
EX:
ban = ("Joe", "Bob")

Say I want to add "Jordan" to the list. How would I?
Report Abuse
Flurite is not online. Flurite
Joined: 03 Apr 2011
Total Posts: 5386
27 Jul 2011 07:04 AM
Your script would error right there. You must learn what tables are.. you should try starting from the beginning because you seem to be missing important coding knowledge. I would suggest Dingdong272's BEGINNER Tutorials for now.
Report Abuse
ns001111 is not online. ns001111
Joined: 15 Jan 2011
Total Posts: 2849
27 Jul 2011 07:06 AM
I should have known not to come here...
Report Abuse
Flurite is not online. Flurite
Joined: 03 Apr 2011
Total Posts: 5386
27 Jul 2011 07:09 AM
Okay, I guess I'll tell you what's wrong. You're table is wrong. Tables are set up like this:

table = {} --notice how I use brackets

Now, this is how you set a long list of values to a table

brick = game.Workspace.Brick
table = {1, "Hi", 563, brick, "HIIIIIIIIIIIII"} --see how I separate every key by a comma character?
Report Abuse
Megamatrixdude is not online. Megamatrixdude
Joined: 06 Dec 2009
Total Posts: 10939
27 Jul 2011 07:10 AM
Yeah, because this is the wrong place for asking for help. -_-

-My hand is a dolphin
Report Abuse
ns001111 is not online. ns001111
Joined: 15 Jan 2011
Total Posts: 2849
27 Jul 2011 07:12 AM
@Mega

It's Scripting Helpers. -_-

@Flurite

I know, but how would I add to it without stating the number.
Like this:
ban = {"Joe", "Bob"}
ban[3] = "Jordan"

But the way my ban script goes, I don't know which number it's going to be. How can i just add it to the end of the list? If this is wrong, the wiki is wrong.
Report Abuse
Megamatrixdude is not online. Megamatrixdude
Joined: 06 Dec 2009
Total Posts: 10939
27 Jul 2011 07:31 AM
I'm pretty sure this was in scripters.

Maybe I'm blind or this was moved.

-My hand is a dolphin
Report Abuse
Flurite is not online. Flurite
Joined: 03 Apr 2011
Total Posts: 5386
27 Jul 2011 09:28 AM
@OP

You just fired a metamethod right there! :O
But that's probably not what you're looking for...

Use the table.insert table function to add keys into a table. Ex:

a = {1, "Hi", 33}

table.insert(a, 1, 5555)

Now, if you loop through the table and print all its values, this is what you should get:

5555
1
"Hi"
33

You can read the Wiki for more help.
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