Xagul
deathzot.net
- Joined
- Jun 30, 2008
- Messages
- 1,295
- Solutions
- 3
- Reaction score
- 1,043
Thank you for taking a look at my problem!
I would like to make a function that returns a value located somewhere in a string. This string will not always be the same so it must locate the pattern and then pull the value from there.
For example:
Now the script would search that string and find the value for magic which would return 50. I figured it would be easier having ( ) around the values so you have a reference point for the search however they can be removed if it does not work as well with them there.
I would like to make a function that returns a value located somewhere in a string. This string will not always be the same so it must locate the pattern and then pull the value from there.
For example:
Code:
string = level (100)
magic (50)
shield (10)
Now the script would search that string and find the value for magic which would return 50. I figured it would be easier having ( ) around the values so you have a reference point for the search however they can be removed if it does not work as well with them there.