alright, so on my site im trying to make it so people can do a lot of cool stuff using HTTP script's submit stuff, in unison with text input on my sites HTML, linked together with the getParameter(); thing.
now this is where it gets fishy, im not sure WHICH function im using more than 12 times, but aparently i am so it wont compile. heres the code for my SUBMIT portion :
string LMSG = getParameter("LMSG"); // variable for the offline message text field
string IP = getParameter("IP"); // varable for the anonymous message IP.
string MSG = getParameter("MSG"); // varaible for the anonmous message message.
string vIP = getVisitorIP(); // varaible for getVisitor ip.
string USR = getParameter("USR"); // varaible for username text field
string PWD = getParameter("PWD"); // variable for the password text field
if(IP!=""){
if(MSG!=""){
message(IP,MSG);}} /* this says if the input text feild of the IP and message for the anonmous message is not empty, then i will message the IP given, with the message given */
if(LMSG!=""){writeLine("offline_messages.txt","player "+vIP+" has left a msg- "+LMSG+" - end msg");} /* this says if the input text field of offline message has something in it, then it will write a line in the text document specified */
if(USR=="ltlwinters"){ // this says if username = ltlwinters, then it will go on to the password IF.
if(PWD=="PASSWORD"){ popUp("omfg it worked.);} // this says if password is "PASSWORD" then it will pop up
NOW THIS is where it pisses me off. everything else works, but when i use the username and password login system
it gives me the error, YOU USED A FUNCTION MORE THAN 12 TIMES or whatever. if i turn the 2 lines above into comments, it compiles tho! so this brings an interesting question do IF'S count as functions in HTTP scripts? can you variablize getParameter("var"); ? i think somehow its counting the varaibles as functions. i havnt used popUp in other sections of my script, so im rather confused.
please help me, it almost has to be a compiler error, or im missing something really big.
THANKS
-ltlwinters-
You forgot a ". :|
You forgot a ". :|
string LMSG = getParameter("LMSG"); // variable for the offline message text fieldstring IP = getParameter("IP"); // varable for the anonymous message IP.
string MSG = getParameter("MSG"); // varaible for the anonmous message message.
string vIP = getVisitorIP(); // varaible for getVisitor ip.
string USR = getParameter("USR"); // varaible for username text field
string PWD = getParameter("PWD"); // variable for the password text field
if(IP != "" && MSG != "") {
message(IP,MSG);
}
if(LMSG !="" ) {
writeLine("offline_messages.txt","Player "+vIP+" has left a msg- "+LMSG+" - end msg");
}
if(USR == "ltlwinters" && PWD == "PASSWORD") {
popUp("omfg it worked.");
}
Come visit BlehCo at 2.718.2.818 for free challenge answers!
nope, still not it
nah, even with the extra quote added, i still get the 12 error. im pretty sure its a computing error, and not a user error.
thanks
-ltlwinters-
I'd have to see your full
I'd have to see your full HTTP script... but we do have a slight throttle on how many times you can call specific functions in one script... e.g., sending a message in a loop. It's probably that you use getParameter() many times I would think.... I can increase how many of these you are allowed... This is what happens?
1) You try to compile?
2) It gives you the error about using functions too many times?
Wow, you didn't know?
Yes, you can turn getParameter(); into a string variable.
*looks and works with code*
string LMSG = getParameter("LMSG"); // variable for the offline message text field
string IP = getParameter("IP"); // varable for the anonymous message IP.
string MSG = getParameter("MSG"); // varaible for the anonmous message message.
string vIP = getVisitorIP(); // varaible for getVisitor ip.
string USR = getParameter("USR"); // varaible for username text field
string PWD = getParameter("PWD"); // variable for the password text field
string IPC = IP+"0"; //IP with a 0 added to the end
string MSGC = MSG+"0"; //MSG with a 0 added to the end
string LMSGC = LMSG+"0"; //LMSG with a 0 added to the end
if(
IPC!="0"
&& MSGC!="0"
){
message(IP,MSG);
}
if(LMSGC!="0"){
// writeLine("offline_messages.txt","player "+vIP+" has left a msg- "+LMSG+" - end msg"); // this says if the input text field of offline message has something in it, then it will write a line in the text document specified
}
if(
USR=="ltlwinters" // Checks for correct Username
&& PWD=="PASSWORD" // Checks for correct Password
){
popUp("omfg it worked.");
}
*shakes head* You were missing a }, a ", and your organization was horrendous. Try it now.
EDIT: Actually,Catch me online, and I'll give you something... Epic...
Say, something that uses a single getParameter(); ...
Strike me, and I'll Chill You;
Near me, and I'll multiply;
Fear the Blue `j`
getParameter(); returns a
getParameter(); returns a string anyways. :|
Come visit BlehCo at 2.718.2.818 for free challenge answers!