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: gsub?

Previous Thread :: Next Thread 
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
23 Jul 2012 11:35 AM
I can't remember how to get rid of the tuple at the end of gsub

print(string.gsub("O hi my name is psaces", "%s", ""))

I don't want it to print "5" at the end. I forgot.. Any help?
Report Abuse
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
23 Jul 2012 11:36 AM
Use another function then? Or make a table, remove the "5", then use unpack() on it?
Report Abuse
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
23 Jul 2012 11:36 AM
There is way, I have done it before :(
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
23 Jul 2012 11:37 AM
Same thing with what electric said. But you can use tabl.concat too if you wanted...
Report Abuse
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
23 Jul 2012 11:37 AM
You could always use variables to take only 1 of the returned values...
Report Abuse
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
23 Jul 2012 11:43 AM
Nvm, I have it:

msg = ("p l e a s e d o n t r e m o v e m y s p a c e s!!!!")
msg = msg:gsub("%s","")
print(msg)

Just if you want to know for future ref.
Report Abuse
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
23 Jul 2012 12:27 PM
I don't usually use gsub... :P
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