Jump to content

If Not not working properly


Recommended Posts

why not just use

If StringRight ( $wpipath , 1 ) <> "\" Then $wpipath = $wpipath & "\"
If StringRight ( $installs , 1 ) <> "\" Then $installs = $installs & "\"
Edited 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

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

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 use

If 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...