JunKmaner Posted April 7, 2012 Share Posted April 7, 2012 My friend is trying to create a virtual world with Flash and PHP. *server side; php* *client: flash*, He didn't create the base of it he paid someone to make it for him. Anyway, He keeps getting member does not exist. This is the file the error is coming from $connexion_sql = mysql_connect($host, $user, $password); $clients[$i]["BDD"] = $connexion_sql; mysql_select_db($dbname,$clients[$i]["BDD"]); $siiid = $input2["sid"]; $nbre = $sqli->query("SELECT username FROM phpbb_users WHERE sid='$siiid'"); $donnees = $nbre->fetch_array(MYSQLI_ASSOC); if($donnees['username'] != 0) { $quete = $sqli->query("SELECT * FROM phpbb_users WHERE sid='$siiid'"); $infos = $quete->fetch_array(MYSQLI_ASSOC); $ip = socket_getpeername($sock, $adress, $port); if($DUMMY == "LOLL") { } else if($infos["ban"] == "0" && $infos["online"] == "0") { for($k=0;$k<count($clients);$k++){ // tous les clients if($clients[$k]["PSEUDO1"] == strtolower($infos["username"])) { $msg = "<punish kid='1' raison='Sent moderator command'/>".$clients[$i]["compteur"].chr(0); @socket_close($clients[$i]["SOCKET"]); echo "deja dans le tableau! \n"; } } $clients[$i]["PSEUDO"] = $infos["username"]; $clients[$i]["U_L"] = $infos["user_level"]; $clients[$i]["PSEUDO1"] = strtolower($clients[$i]["PSEUDO"]); $clients[$i]["SESSION"] = $clients[$i]["PSEUDO1"]; $clients[$i]["ID"] = $infos["user_id"]; $clients[$i]["AD"] = $infos["avatar_design"]; $ip = socket_getpeername($sock, $adress, $port); $clients[$i]["IP"] = $adress; $clients[$i]["GOTFLAG"] = "0"; $clients[$i]["GOTDYNAMITE"] = "0"; $clients[$i]["AD1"] = $infos["avatar_design"]; $clients[$i]["AD_SPECIAL"] = $infos["ad_special"]; $clients[$i]["TAGS"] = $infos["user_notify"]; $clients[$i]["TAGS"] = dotag($clients[$i]["TAGS"]); $clients[$i]["ATTRIBUT"] = $infos["rang"]; $clients[$i]["RANK_MAZO"] = $infos["rank_mazo"]; $clients[$i]["RANK_LAPINO"] = $infos["rank_lapino"]; $clients[$i]["ANIMAL"] = $infos["animal"]; $clients[$i]["ANIMAL1"] = $infos["animal"]; $clients[$i]["INIT"]=true; // on m�morise que ce client est initialis� $clients[$i]["compteur"]= "0"; $clients[$i]["ROOM"]= "dispatcher"; $clients[$i]["mazo"] = $infos["mazo"]; $clients[$i]["map"] = "dispatcher"; $clients[$i]["confirmation"] = "0"; $clients[$i]["position"] = $infos["position"]; $clients[$i]["classementlr"] = $infos["classement_lapino"]; $clients[$i]["classementcapture"] = $infos["classement_capture"]; $clients[$i]["score_patojdur"] = "0"; $clients[$i]["plot"] = ""; $code_vrai=preg_split("/;/", $clients[$i]["AD1"]); $code_ace = $code_vrai[1]; $code_hab = $code_vrai[0]; $code_hat = $code_vrai[2]; $code_body = $code_vrai[3]; $code_shoes = $code_vrai[4]; $code_ace2 = $code_vrai[5]; $code_ace3 = $code_vrai[6]; if($code_vrai[2] == "92" AND ($clients[$i]["U_L"] != 1)) { if($clients[$i]["RANK_MAZO"] == "1") { $code_hat = $code_vrai[2]; } else { $code_hat = "1"; } } else if($code_vrai[2] == "93" AND ($clients[$i]["U_L"] != 1)) { if($clients[$i]["RANK_MAZO"] == "2") { $code_hat = $code_vrai[2]; } else { $code_hat = "1"; } } else if($code_vrai[2] == "94" AND ($clients[$i]["U_L"] != 1)) { if($clients[$i]["RANK_MAZO"] == "3") { $code_hat = $code_vrai[2]; } else { $code_hat = "1"; } } $clients[$i]["AD1"] = "$code_hab;$code_ace;$code_hat;$code_body;$code_shoes;$code_ace2;$code_ace3"; $clients[$i]["AD"] = "$code_hab;$code_ace;$code_hat;$code_body;$code_shoes;$code_ace2;$code_ace3"; $quete8 = mysql_query('UPDATE phpbb_users SET online = 1 WHERE username = "'.$clients[$i]["PSEUDO"].'"'); if (cmd()) { $msg = cmd(); @socket_write($clients[$i]["SOCKET"], $msg, strlen($msg)); @socket_write($clients[$k]["SOCKET"], $msg, strlen($msg)); } $zzz = mysql_query("UPDATE phpbb_users SET ipconnexion = '".$clients[$i]["IP"]."' WHERE username = '".$userdata['username']."'"); $quete80 = mysql_query('UPDATE phpbb_users SET avatar_design = "'.$clients[$i]["AD1"].'" WHERE username = "'.$clients[$i]["PSEUDO"].'"'); mysql_close($clients[$i]["BDD"]); if($clients[$i]["ATTRIBUT"] == "1") { $msg = '<user attributes="'.$clients[$i]["ATTRIBUT"].'" avatar_design="'.$clients[$i]["AD"].'" p="'.$clients[$i]["PSEUDO"].'" level="25" i="'.$clients[$i]["SESSION"].'" id="'.$clients[$i]["ID"].'" mid="'.$clients[$i]["ID"].'" ><items t="powers" ><item id="1015" /><item id="1105" /><item id="1014" /><item id="1013" /><item id="256" /><item id="258" /><item id="255" /><item id="1008" /><item id="257" />'.getitems($clients[$i]["PSEUDO"]).'</items></user>'.$clients[$i]["compteur"].chr(0); @socket_write($clients[$i]["SOCKET"], $msg, strlen($msg)); $vipcount++; } else if($clients[$i]["ATTRIBUT"] == "2") { $msg = '<user attributes="'.$clients[$i]["ATTRIBUT"].'" avatar_design="'.$clients[$i]["AD"].'" p="'.$clients[$i]["PSEUDO"].'" level="25" i="'.$clients[$i]["SESSION"].'" mid="'.$clients[$i]["ID"].'" ><items t="powers" ><item id="1015" /><item id="1105" /><item id="1014" /><item id="1013" /><item id="256" /><item id="258" /><item id="255" /><item id="1008" />'.getitems($clients[$i]["PSEUDO"]).'</items></user>'.$clients[$i]["compteur"].chr(0); @socket_write($clients[$i]["SOCKET"], $msg, strlen($msg)); $vipcount++; } else if($clients[$i]["ATTRIBUT"] == "5") { $msg = '<user attributes="'.$clients[$i]["ATTRIBUT"].'" avatar_design="'.$clients[$i]["AD"].'" p="'.$clients[$i]["PSEUDO"].'" level="25" i="'.$clients[$i]["SESSION"].'" mid="'.$clients[$i]["ID"].'" ><items t="powers" ><item id="1015" /><item id="1105" /><item id="1014" /><item id="1013" /><item id="256" /><item id="258" /><item id="255" /><item id="1008" />'.getitems($clients[$i]["PSEUDO"]).'</items></user>'.$clients[$i]["compteur"].chr(0); @socket_write($clients[$i]["SOCKET"], $msg, strlen($msg)); $vipcount++; } else if($clients[$i]["ATTRIBUT"] == "6") { $msg = '<user attributes="'.$clients[$i]["ATTRIBUT"].'" avatar_design="'.$clients[$i]["AD"].'" p="'.$clients[$i]["PSEUDO"].'" level="25" i="'.$clients[$i]["SESSION"].'" mid="'.$clients[$i]["ID"].'" ><items t="powers" ><item id="1015" /><item id="1105" /><item id="1014" /><item id="1013" /><item id="256" /><item id="258" /><item id="255" /><item id="1008" />'.getitems($clients[$i]["PSEUDO"]).'</items></user>'.$clients[$i]["compteur"].chr(0); @socket_write($clients[$i]["SOCKET"], $msg, strlen($msg)); $vipcount++; } else { $clients[$i]["ATTRIBUT"] = "0"; $msg = '<user attributes="'.$clients[$i]["ATTRIBUT"].'" avatar_design="'.$clients[$i]["AD"].'" p="'.$clients[$i]["PSEUDO"].'" level="25" i="'.$clients[$i]["SESSION"].'" mid="'.$clients[$i]["ID"].'" ><items t="powers" >'.getitems($clients[$i]["PSEUDO"]).'</items></user>'.$clients[$i]["compteur"].chr(0); @socket_write($clients[$i]["SOCKET"], $msg, strlen($msg)); } echo ("( ".$clients[$i]["IP"]." ) ".$clients[$i]["PSEUDO"]." vient de se connecter au tchat !\n"); $ccount++; $clients[$i]["compteur"]++; $welcomekey = array_rand($welcomepop); $welcome_message = $welcomepop[$welcomekey]; $msg = "<alert t='".$welcome_message."'/>".$clients[$i]["compteur"].chr(0); @socket_write($clients[$i]["SOCKET"], $msg, strlen($msg)); } else if($infos["ban"] == "1") { $clients[$i]["compteur"]++; $connexion_sql = mysql_connect($host, $user, $password); $clients[$i]["BDD"] = $connexion_sql; mysql_select_db($dbname,$clients[$i]["BDD"]); $siiid = $input2["sid"]; $nbre = mysql_query("SELECT COUNT(*) AS exist FROM phpbb_users WHERE sid ='$siiid'"); $donnees = mysql_fetch_array($nbre); if($donnees['exist'] != 0) { $quete = mysql_query("SELECT * FROM phpbb_users WHERE sid ='$siiid'"); $infos = mysql_fetch_array($quete); $ip = socket_getpeername($sock, $adress, $port); $nbres = mysql_query("SELECT COUNT(*) AS exist FROM ip_acces WHERE ip = '$adress'"); $aok = mysql_fetch_array($nbres); if($aok['exist'] != 0) { array_splice($clients,$i,1); // on le retire du tableau $i--; echo "aok \n"; socket_close($sock); echo "Tentative ip ban ( ".$adress." ) \n"; mysql_close($connexion_sql); } else if($infos["ban"] == "0" && $infos["online"] == "0") { for($k=0;$k<count($clients);$k++){ // tous les clients if($clients[$k]["PSEUDO1"] == strtolower($infos["username"])) { $msg = "<punish kid='1' raison='Sent moderator command'/>".$clients[$i]["compteur"].chr(0); @socket_close($clients[$i]["SOCKET"]); echo "deja dans le tableau! \n"; } } $clients[$i]["PSEUDO"] = $infos["username"]; $clients[$i]["U_L"] = $infos["user_level"]; $clients[$i]["PSEUDO1"] = strtolower($clients[$i]["PSEUDO"]); $clients[$i]["SESSION"] = $clients[$i]["PSEUDO1"]; $clients[$i]["ID"] = $infos["user_id"]; $clients[$i]["AD"] = $infos["avatar_design"]; $ip = socket_getpeername($sock, $adress, $port); $clients[$i]["IP"] = $adress; $clients[$i]["GOTFLAG"] = "0"; $clients[$i]["GOTDYNAMITE"] = "0"; $clients[$i]["AD1"] = $infos["avatar_design"]; $clients[$i]["AD_SPECIAL"] = $infos["ad_special"]; $clients[$i]["TAGS"] = $infos["user_notify"]; $clients[$i]["TAGS"] = dotag($clients[$i]["TAGS"]); $clients[$i]["ATTRIBUT"] = $infos["rang"]; $clients[$i]["RANK_MAZO"] = $infos["rank_mazo"]; $clients[$i]["RANK_LAPINO"] = $infos["rank_lapino"]; $clients[$i]["ANIMAL"] = $infos["animal"]; $clients[$i]["ANIMAL1"] = $infos["animal"]; $clients[$i]["INIT"]=true; // on m�morise que ce client est initialis� $clients[$i]["compteur"]= "0"; $clients[$i]["ROOM"]= "dispatcher"; $clients[$i]["mazo"] = $infos["mazo"]; $clients[$i]["map"] = "dispatcher"; $clients[$i]["confirmation"] = "0"; $clients[$i]["position"] = $infos["position"]; $clients[$i]["classementlr"] = $infos["classement_lapino"]; $clients[$i]["classementcapture"] = $infos["classement_capture"]; $clients[$i]["score_patojdur"] = "0"; $clients[$i]["plot"] = ""; $code_vrai=preg_split("/;/", $clients[$i]["AD1"]); $code_ace = $code_vrai[1]; $code_hab = $code_vrai[0]; $code_hat = $code_vrai[2]; $code_body = $code_vrai[3]; $code_shoes = $code_vrai[4]; $code_ace2 = $code_vrai[5]; $code_ace3 = $code_vrai[6]; if($code_vrai[2] == "92" AND ($clients[$i]["U_L"] != 1)) { if($clients[$i]["RANK_MAZO"] == "1") { $code_hat = $code_vrai[2]; } else { $code_hat = "1"; } } else if($code_vrai[2] == "93" AND ($clients[$i]["U_L"] != 1)) { if($clients[$i]["RANK_MAZO"] == "2") { $code_hat = $code_vrai[2]; } else { $code_hat = "1"; } } else if($code_vrai[2] == "94" AND ($clients[$i]["U_L"] != 1)) { if($clients[$i]["RANK_MAZO"] == "3") { $code_hat = $code_vrai[2]; } else { $code_hat = "1"; } } $clients[$i]["AD1"] = "$code_hab;$code_ace;$code_hat;$code_body;$code_shoes;$code_ace2;$code_ace3"; $clients[$i]["AD"] = "$code_hab;$code_ace;$code_hat;$code_body;$code_shoes;$code_ace2;$code_ace3"; $quete8 = mysql_query('UPDATE phpbb_users SET online = 1 WHERE username = "'.$clients[$i]["PSEUDO"].'"'); if (cmd()) { $msg = cmd(); @socket_write($clients[$i]["SOCKET"], $msg, strlen($msg)); @socket_write($clients[$k]["SOCKET"], $msg, strlen($msg)); } $zzz = mysql_query("UPDATE phpbb_users SET ipconnexion = '".$clients[$i]["IP"]."' WHERE username = '".$userdata['username']."'"); $quete80 = mysql_query('UPDATE phpbb_users SET avatar_design = "'.$clients[$i]["AD1"].'" WHERE username = "'.$clients[$i]["PSEUDO"].'"'); mysql_close($clients[$i]["BDD"]); if($clients[$i]["ATTRIBUT"] == "1") { $msg = '<user attributes="'.$clients[$i]["ATTRIBUT"].'" avatar_design="'.$clients[$i]["AD"].'" p="'.$clients[$i]["PSEUDO"].'" level="25" i="'.$clients[$i]["SESSION"].'" id="'.$clients[$i]["ID"].'" mid="'.$clients[$i]["ID"].'" ><items t="powers" ><item id="1015" /><item id="1105" /><item id="1014" /><item id="1013" /><item id="256" /><item id="258" /><item id="255" /><item id="1008" /><item id="257" />'.getitems($clients[$i]["PSEUDO"]).'</items></user>'.$clients[$i]["compteur"].chr(0); @socket_write($clients[$i]["SOCKET"], $msg, strlen($msg)); $vipcount++; } else if($clients[$i]["ATTRIBUT"] == "2") { $msg = '<user attributes="'.$clients[$i]["ATTRIBUT"].'" avatar_design="'.$clients[$i]["AD"].'" p="'.$clients[$i]["PSEUDO"].'" level="25" i="'.$clients[$i]["SESSION"].'" mid="'.$clients[$i]["ID"].'" ><items t="powers" ><item id="1015" /><item id="1105" /><item id="1014" /><item id="1013" /><item id="256" /><item id="258" /><item id="255" /><item id="1008" />'.getitems($clients[$i]["PSEUDO"]).'</items></user>'.$clients[$i]["compteur"].chr(0); @socket_write($clients[$i]["SOCKET"], $msg, strlen($msg)); $vipcount++; } else if($clients[$i]["ATTRIBUT"] == "5") { $msg = '<user attributes="'.$clients[$i]["ATTRIBUT"].'" avatar_design="'.$clients[$i]["AD"].'" p="'.$clients[$i]["PSEUDO"].'" level="25" i="'.$clients[$i]["SESSION"].'" mid="'.$clients[$i]["ID"].'" ><items t="powers" ><item id="1015" /><item id="1105" /><item id="1014" /><item id="1013" /><item id="256" /><item id="258" /><item id="255" /><item id="1008" />'.getitems($clients[$i]["PSEUDO"]).'</items></user>'.$clients[$i]["compteur"].chr(0); @socket_write($clients[$i]["SOCKET"], $msg, strlen($msg)); $vipcount++; } else if($clients[$i]["ATTRIBUT"] == "6") { $msg = '<user attributes="'.$clients[$i]["ATTRIBUT"].'" avatar_design="'.$clients[$i]["AD"].'" p="'.$clients[$i]["PSEUDO"].'" level="25" i="'.$clients[$i]["SESSION"].'" mid="'.$clients[$i]["ID"].'" ><items t="powers" ><item id="1015" /><item id="1105" /><item id="1014" /><item id="1013" /><item id="256" /><item id="258" /><item id="255" /><item id="1008" />'.getitems($clients[$i]["PSEUDO"]).'</items></user>'.$clients[$i]["compteur"].chr(0); @socket_write($clients[$i]["SOCKET"], $msg, strlen($msg)); $vipcount++; } else { $clients[$i]["ATTRIBUT"] = "0"; $msg = '<user attributes="'.$clients[$i]["ATTRIBUT"].'" avatar_design="'.$clients[$i]["AD"].'" p="'.$clients[$i]["PSEUDO"].'" level="25" i="'.$clients[$i]["SESSION"].'" mid="'.$clients[$i]["ID"].'" ><items t="powers" >'.getitems($clients[$i]["PSEUDO"]).'</items></user>'.$clients[$i]["compteur"].chr(0); @socket_write($clients[$i]["SOCKET"], $msg, strlen($msg)); } echo ("( ".$clients[$i]["IP"]." ) ".$clients[$i]["PSEUDO"]." vient de se connecter au tchat !\n"); $ccount++; $clients[$i]["compteur"]++; $welcomekey = array_rand($welcomepop); $welcome_message = $welcomepop[$welcomekey]; $msg = "<alert t='".$welcome_message."'/>".$clients[$i]["compteur"].chr(0); @socket_write($clients[$i]["SOCKET"], $msg, strlen($msg)); } else if($infos["ban"] == "1") { $clients[$i]["compteur"]++; $msg = "<punish kid='1' raison='Attempt to moderate creator'/>".$clients[$i]["compteur"].chr(0); @socket_close($clients[$i]["SOCKET"]); mysql_close($clients[$i]["BDD"]); "banned, can't connect! \n"; } else if($infos["online"] == "1") { $clients[$i]["compteur"]++; $msg = "<punish kid='1' raison='Attempt to moderate creator'/>".$clients[$i]["compteur"].chr(0); @socket_close($clients[$i]["SOCKET"]); echo "alredy online \n"; mysql_close($clients[$i]["BDD"]); } } else { $clients[$i]["compteur"]++; $msg = "<punish kid='1' raison='Attempt to moderate creator'/>".$clients[$i]["compteur"].chr(0); echo "member does not exist\n"; @socket_close($clients[$i]["SOCKET"]); mysql_close($clients[$i]["BDD"]); } $msg = "<punish kid='1' raison='Attempt to moderate creator'/>".$clients[$i]["compteur"].chr(0); @socket_close($clients[$i]["SOCKET"]); mysql_close($clients[$i]["BDD"]); "banned, can't connect! \n"; } else if($infos["online"] == "1") { $clients[$i]["compteur"]++; $msg = "<punish kid='1' raison='Attempt to moderate creator'/>".$clients[$i]["compteur"].chr(0); @socket_close($clients[$i]["SOCKET"]); echo "alredy online \n"; mysql_close($clients[$i]["BDD"]); } } else { $clients[$i]["compteur"]++; $msg = "<punish kid='1' raison='Attempt to moderate creator'/>".$clients[$i]["compteur"].chr(0); echo "member does not exist\n"; @socket_close($clients[$i]["SOCKET"]); mysql_close($clients[$i]["BDD"]); } We do not have a clue how to fix this, the file connects from another one, The person who made this broke it up so its easier to use. but we don't know how to ix this. If anything else is required just reply Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/260499-member-does-not-exist/ 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.