CourtneyRae Posted October 4, 2013 Share Posted October 4, 2013 I'm, unfortunately, asking the question on behalf of our coder, so I may not phrase it entirely correct (Apologies in advance!). We are trying to use the following code to make a particular message display onscreen upon logging in. We think that the if statement is not functioning, or not reading the value as true. Any way to fix the problem? if ($isloggingin == 1) { set("last_login",time()); set("flags",str_replace("(nodeltemp)","",get("flags"))); $action = "/".get("login"); echo "<font color=".get("tcolor").">\n"; print (getfile("rpinfo")); print nl2br(stripslashes(getfile("login"))); $pcs=explode(":",getfile("online")); for($i=0;$i<count($pcs);$i++) { if(strpos(getuser($pcs[$i],"friends"),$username)!==false&&!(getuser($pcs[$i],"x")==get("x")&&getuser($pcs[$i],"y")==get("y")&&getuser($pcs[$i],"z")==get("z")&&getuser($pcs[$i],"plane")==get("plane"))) setuser($pcs[$i],"chat",getuser($pcs[$i],"chat")."<font class=friends><input type=button class=button onClick=javascript:tellTo('$username') value=*>$username has come online.</font><br>\n"); } } Thanks for any help! Quote Link to comment Share on other sites More sharing options...
requinix Posted October 4, 2013 Share Posted October 4, 2013 Nothing that looks obvious to me. Basic debugging steps: find out the assorted values, from variables and files and function calls, and compare them to what the code is expecting to see. Quote Link to comment Share on other sites More sharing options...
CourtneyRae Posted October 4, 2013 Author Share Posted October 4, 2013 Thank you! Good to know the code isn't wonky. Do you have any idea where we would look for the values? Quote Link to comment Share on other sites More sharing options...
requinix Posted October 4, 2013 Share Posted October 4, 2013 No, but it should be trivial for your coder to find the source code for get(), getfile(), and getuser() to determine how those work. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.