I'm new to scripting and just creating a HTTP script so if your IP is the host ip then show a specific message. Do any of you know a IF code for that?
I'm using:
---ENTER----
if getVisitorIP() = getHostIP() {
message(getVisitorIP(),"Welcome to your store.");
popUp(getVisitorIP(),"Welcome to HTTP 7 - This is a preview of your store!");
logMessage("Host of website entered.");
logMessage("Browsing.....");
else
popUp("ALL scripts on the website are copyright of me!");
logMessage(getVisitorIP(),"0 - Entered the site");
logMessage(getVisitorIP(),"0 - Browsing....");
}
Please don't copy the code! I just need some simple answers
IF Syntax
It's definitely possible but the first thing that jumps out at me from your code is that the structure of your if statement is a little funky. You have:
if condition {
statements
else
statements
}
which is a little like the BASIC if statement. It should be:
if ( condition ) {
statements
} else {
statements
}
Make sense?
From Wartt Hog
Yea.....
I looked somewhere else and got it working, thanks. Yours also helped me make mine
better.
=)
Alan Doherty - Search: UniversalSYS
Excellent
Glad I could help.
From Wartt Hog