Ace08 2 Posted October 5, 2010 hi guys i have sample code. $a = ':59:/12345678' $a = stringReplace($a, ":59:", "") $a = stringReplace($a, " ", "") $a = stringReplace($a, "-", "") $a = stringReplace($a, "/", "") if isnumber($a) then MsgBox(0, "line", $a) else MsgBox(0, "error", 'Not a Number') endif as you can see the the value of $a before it starts to do the if statement will be "12345678" but then again the msgbox that i am getting is the second one "Not a number". so i came up with the conclusion that $a is still a string, question is how do i do this? (what i mean is how would the script know if its already a number or not?) Work smarter not harder.My First Posted Script: DataBase Share this post Link to post Share on other sites
AdmiralAlkex 125 Posted October 5, 2010 The helpfile is very clear that StringReplace() returns a string. To convert a string to a number see Number(), but you probably want StringIsDigit or one of the related functions. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Share this post Link to post Share on other sites
Ace08 2 Posted October 5, 2010 thanks for the info AdmiralAlkex its now working Work smarter not harder.My First Posted Script: DataBase Share this post Link to post Share on other sites