How can I test if a string contains a number?
I want to use the "eval" function on a string, but when I do it on a string without numbers I get the following:
Invalid number of parameters 0, expected at least 1 parameters
How to test if String contains a number?
Moderators: dorpond, trevor, Azhrei
How to test if String contains a number?
MT Framework: Call of Cthulhu 7th fork, D&D 5e Spell Library
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
Re: How to test if String contains a number?
You can use Wiki: isNumber() or you can use this trick.
Code: Select all
[H: result = eval(""+value)]
OR
[H: result = eval(string(value))]
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools