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']);
?> <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];
}