Jump to content
TrinityCore

Inceptionz

Members
  • Posts

    145
  • Joined

  • Last visited

About Inceptionz

  • Birthday 04/17/1993

Profile Information

  • Gender
    Male
  • Location
    Sp@ce
  • Interests
    I like to go fast

Inceptionz's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. It doesn't explain it... but it still fixes the problem for the teleporter script, but i cant find anything wrong with this...=/ I bet that the error Unknown column 'username' in 'where clause is just something stupid in the sites script.. but has nothing to do with the username column.. because changing , to . fixed the problem on the teleporter module.. but i cant see where i can make the same changes to fix this problem...
  2. The thing is that i had the exact same problem with the Character teleporter and it gave the same error when i would try teleporting my character to Dalaran, so i took a look at the script and this is what i found: //shattrath case 9: $map = "530"; $x = "-1863.03"; $y = "4998.05"; $z = "-21.1847"; $place = "Shattrath"; break; //dalaran case 10: $map = "571"; $x = "5804,62"; $y = "619,803"; $z = "649"; $place = "Dalaran"; break; as you can see the teleporting coordinates for Dalaran have a , in between them instead of a . - so i replaced the , with dots and then it worked perfectly fine and didnt give me that error... Anyways, i dont want to bother you too much ^^ but thanks for helpign me now
  3. In the file i found define("TBL_ACCOUNT", $config['engine_logon_db'].".account"); define("TBL_ACCOUNT_ACCESS", $config['engine_logon_db'].".account_access"); define("TBL_CHARACTERS", "characters"); define("TBL_BANNED_USERS_SERVER", $config['engine_logon_db'].".account_banned");
  4. Hey, I'm going to post everything i know about the problem right now, I had the exact same problem (error message) with my teleporter module whenever i would try and teleport to Dalaran, I fixed that by going into the PHP script and the coordinates for Dalaran had commas instead of periods, so i replaced that and now it works fine, but i can't find such an easy fix for the Unstucker.. Here is the whole Unstucker script... <?php global $user,$db,$form,$lang,$config,$Html; /** * This part of website is executed before any output is given * so every post data is processed here then using Header(Location:) * we simply call normal site and display errors **/ /** * Access premission: **/ if(!$user->logged_in){ if (!isset($proccess)) echo "<a href='./?page=loginout'>".$lang['Login']."</a>"; return; } /** * MODULE SELF INSTALLATION (none for this module): **/ /*if (!isset($proccess)) { if($Html->moduleinstall('',array(),array(),array(),array())) return; }*/ /** * :END MODULE SELF INSTALLATION **/ if(isset($proccess) && $proccess == TRUE){ /** * Processes the user submitted login form, if errors * are found, the user is redirected to correct the information, * if not, the user is effectively logged in to the system. * If user is logged in, he will be logged out and redirected to * index.php page. */ function Process(){ global $user, $form, $config,$db,$lang; $charinfo = preg_replace( "/[^0-9-]/", "", $_POST['character'] ); $charinfo = explode("-", $charinfo ); $realmid=$charinfo[0]; $charguid=$charinfo[1]; /* Get character info */ $db_realm = connect_realm($realmid); $char_info0 = $db_realm->query( $user->CoreSQL(1 ,$charguid, $realmid ) ) or die ($db->error('error_msg')); $char_info = $db_realm->fetch_array( $char_info0 ); //unstuck! //echo $user->CoreSQL( 3 ,$char_info['guid'], $realmid );exit; $tel_db = $db_realm->query( $user->CoreSQL( 3 .$char_info['guid'], $realmid ) ) or die ($db->error('error_msg')); if ($tel_db) { $_SESSION['notice'] ="<center><a href='./?page=wwc-unstucker'>".$lang['OK']."</a></center>"; return; } else $_SESSION['notice'] ="<center>Failed!<br><br><a href='./?page=wwc-unstucker'>".$lang['OK']."</a></center>"; } if (isset($_POST['unstuck'])){ /* Initialize process */ Process(); } /* Reinitilaze 'form' proccess with latest session data */ $form->_Form(); return; } ?> <!-- This element is important, must be at beginning of module output, dont change it, except module name --> <div class="post_body_title"><?php echo $lang['Unstucker']; ?></div> <?php /** * Notification **/ if (isset($_SESSION['notice'])){ echo $_SESSION['notice']; unset($_SESSION['notice']); return; } ?> <center><form method="post"> <?php $user->print_Char_Dropdown($user->userinfo['guid']); ?>&nbsp;&nbsp;<input name="unstuck" type="submit" value="<?php echo $lang['OK']; ?>" /></form><br /> </center> and this is what i believe to be the SQL that will be executed.. Found it in a seperate file, Trinity.php $sqls = array( /** * Select username and userids: * param1 = username; **/ 0 => 'SELECT id,username FROM '.TBL_ACCOUNT.' WHERE username LIKE "%'.$db->escape($param1).'%"', /** * Select character info (donation and vote shops, teleporter): * param1 = realm_id (0->); param2 = char_guid; **/ 1 => 'SELECT name,guid,race,class,gender,level,money FROM '.$config_data[$id.'-2'][0].'.'.TBL_CHARACTERS.' WHERE guid="'.$param1.'" AND account="'.$user->userinfo['guid'].'" LIMIT 1', /** * Teleport character **/ 2 => 'UPDATE '.$config_data[$id.'-2'][0].'.'.TBL_CHARACTERS.' SET position_x="'.$param3.'", position_y="'.$param4.'", position_z="'.$param5.'", map="'.$param1.'", money="'.$param6.'" WHERE guid="'.$param7.'"', /** * Unstuck character **/ 3 => 'UPDATE '.$config_data[$id.'-2'][0].'.'.TBL_CHARACTERS." INNER JOIN ".$config_data[$id.'-2'][0].".character_homebind ON ".TBL_CHARACTERS.".guid = character_homebind.guid AND ".TBL_CHARACTERS.".guid = '".$param1."' SET ".TBL_CHARACTERS.".position_X = character_homebind.position_x, ".TBL_CHARACTERS.".position_Y = character_homebind.position_y, ".TBL_CHARACTERS.".position_z = character_homebind.position_z", /** * Expansion change, 0 to 3 **/ 4 => "UPDATE ".TBL_ACCOUNT." SET expansion='".$param2."' WHERE id='".$param1."'", ); return $sqls[$id]; }
  5. I agree, but i checked my auth database and everything seems to be fine, I mean i am not having any in-game problems with accounts or anything and i see the username field in auth > colums > username, varchar (32) and i see all the user names and everything. I just don't understand because this has always worked for me in the past until recently it stopped working, and nobody else reported this problem and i even tried starting with a fresh website and everything and it still didn't work >.< I wish there was just some other Unstucker script that is simple like Select the character from a drop down list and click "Unstuck" so that i could implement it to my site, but i fail at PHP and everyone else who attempts that fails because they are never secure..
  6. I dont know where else i would look for "username" ... It's not in the unstucker.php script, not in the core php file that has the SQL querie for the unstucker.php script, I'm psyched.
  7. Hey sorry, I'm using Web-wow, the name of my dbs are auth, characters and world. Here is the SQL code * Unstuck character **/ 3 => "UPDATE ".$config_data[$id.'-2'][0].'.'.TBL_CHARACTERS." INNER JOIN ".$config_data[$id.'-2'][0].".character_homebind ON ".TBL_CHARACTERS.".guid = character_homebind.guid AND ".TBL_CHARACTERS.".guid = '".$param1."' SET ".TBL_CHARACTERS.".position_X = character_homebind.position_x, ".TBL_CHARACTERS.".position_Y = character_homebind.position_y, ".TBL_CHARACTERS.".position_z = character_homebind.position_z", /**
  8. I am using a unstucker script that has always done the trick for me, but now for some reason after clicking the unstuck button i get brough to a blank page with this error "Unknown column 'username' in 'where clause'" I was hoping someone could help me out.
×
×
  • Create New...