#help with getting number out of a string

1 messages · Page 1 of 1 (latest)

scenic gate
#
    permission: renameItem.name
    trigger:
        set {_t} to uncolored name of tool
        set {_t::*} to {_t} split at ""
        send {_t::2} to player
        set {_L} to {_t::2}
        add 1 to {_L}
        send {_L} to player```

hey I have this, I'm trying to get item to the next tier, meaning I have item called 
```&f[&c5&f] &fSword```
 and I want to add 1 to the number so it will be
 
```&f[&c6&f] &fSword```
 I have the skript above, the problem is that it doesn't add 1 to {_L} it sends me the number it is currently 

```%{_num}+1%```
 if I send this, it sends me ```<none>```
but 
```%{_num}%```
 sends me the number
solar pier
#

{_num} parsed as number

scenic gate
#

Thanks will check that

#

Also how can I replace the number with the new number?
Is there like replace all numbers with...

solar pier
mental rose
#

You can also add the teir as an NBT tag, then you dont need to parse