Asinny
|
  |
| Joined: 04 Oct 2014 |
| Total Posts: 2757 |
|
|
| 27 Aug 2016 10:19 PM |
print(string.gsub(")", ")", ""))
wat
|
|
|
| Report Abuse |
|
|
| |
|
Asinny
|
  |
| Joined: 04 Oct 2014 |
| Total Posts: 2757 |
|
| |
|
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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 27 Aug 2016 10:46 PM |
| nvm i dont see what you are trying to do |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 27 Aug 2016 10:48 PM |
just match it to %d+
it should get all the numbers first found in the command
|
|
|
| Report Abuse |
|
|
|
| 27 Aug 2016 11:01 PM |
/pC2GKcvv
pastebin
This siggy is copyrighted © |
|
|
| Report Abuse |
|
|