Swimming_Bird Posted September 20, 2005 Share Posted September 20, 2005 Is it my code that is messing up? If Not StringRight ( $wpipath , 1 ) = "\" Then $wpipath = $wpipath & "\" If Not StringRight ( $installs , 1 ) = "\" Then $installs = $installs & "\" Link to comment Share on other sites More sharing options...
B3TA_SCR1PT3R Posted September 20, 2005 Share Posted September 20, 2005 (edited) why not just use If StringRight ( $wpipath , 1 ) <> "\" Then $wpipath = $wpipath & "\" If StringRight ( $installs , 1 ) <> "\" Then $installs = $installs & "\" Edited September 20, 2005 by B3TA_SCR1PT3R [right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right] Link to comment Share on other sites More sharing options...
jefhal Posted September 20, 2005 Share Posted September 20, 2005 Is it my code that is messing up?If Not StringRight ( $wpipath , 1 ) = "\" Then $wpipath = $wpipath & "\" If Not StringRight ( $installs , 1 ) = "\" Then $installs = $installs & "\"Are you sure that the last character in $wpipath and $installs is not a cr or lf or crlf or space or something else?Try:$var = StringRight($installs,1) msgbox(1,"Last char is:",$var) ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
Swimming_Bird Posted September 20, 2005 Author Share Posted September 20, 2005 Are you sure that the last character in $wpipath and $installs is not a cr or lf or crlf or space or something else?Try:$var = StringRight($installs,1) msgbox(1,"Last char is:",$var)$wpipath and $installs are strings read from an ini file. so afaik they couldnt have any of those things, a space may be in there, but i dont mind it erroring out if someone messes up the ini file and puts a space there.why not just useIf StringRight ( $wpipath , 1 ) <> "\" Then $wpipath = $wpipath & "\" If StringRight ( $installs , 1 ) <> "\" Then $installs = $installs & "\"worked great thanks, i didnt realize <> meant not equal to. i didnt even know <> existed./me is not a programer Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now