Hi there,
I've got a region named building12
I would like to get the integer from the string and save it in a variable.
The output of %region% is:
I would like to save the number in the string in a variable.
So when a player enters a region named: building14
then the variable should be set to: 14
What's the best way to do that?
Hope you can help me.
Many thanks in advance.
I've got a region named building12
I would like to get the integer from the string and save it in a variable.
Code:
on region enter:
message "Entering %region%."
if "%region%" contains "building":
set {_tempstring} to region
The output of %region% is:
Code:
building12 in world world
I would like to save the number in the string in a variable.
So when a player enters a region named: building14
then the variable should be set to: 14
What's the best way to do that?
Hope you can help me.
Many thanks in advance.