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: "invalid pattern capture"

Previous Thread :: Next Thread 
Asinny is not online. Asinny
Joined: 04 Oct 2014
Total Posts: 2757
27 Aug 2016 10:19 PM
print(string.gsub(")", ")", ""))

wat


Report Abuse
CodeBreadpudding is not online. CodeBreadpudding
Joined: 24 Aug 2016
Total Posts: 1286
27 Aug 2016 10:19 PM
What did I just read
Report Abuse
Asinny is not online. Asinny
Joined: 04 Oct 2014
Total Posts: 2757
27 Aug 2016 10:20 PM
an unsolved predicament


Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
27 Aug 2016 10:22 PM
if you want to actually use ) or ( in the string you have to escape it like %( or %) because parentheses are used for captures.
Report Abuse
Asinny is not online. Asinny
Joined: 04 Oct 2014
Total Posts: 2757
27 Aug 2016 10:44 PM
I get an error whenever I try to tonumber the full string even though the outcome should be a number

"(base out of range)"


Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
27 Aug 2016 10:45 PM
are you trying to get the numbers inside a parenthesis..?

if so then

print(string.gsub("hello (3240)","%b()",""):match("%d"))
Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
27 Aug 2016 10:46 PM
nvm i dont see what you are trying to do
Report Abuse
Asinny is not online. Asinny
Joined: 04 Oct 2014
Total Posts: 2757
27 Aug 2016 10:47 PM
no I have a command
"setnumber(1)"

and want to get 1 from the command so im getting rid the parentheses


Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
27 Aug 2016 10:48 PM
just match it to %d+

it should get all the numbers first found in the command

Report Abuse
killerbot29003 is online. killerbot29003
Joined: 04 Oct 2014
Total Posts: 3054
27 Aug 2016 11:01 PM
/pC2GKcvv

pastebin



This siggy is copyrighted ©
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