• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Converting GesiorAcc to ZnoteAcc - Powergamers.php

Code:
string(334) "SELECT `p`.`name`, `p`.`level`, `p`.`vocation`, `p`.`experience`, `p`.`exphist1`, `p`.`exphist2`, `p`.`exphist3`, `p`.`exphist_lastexp`, `p_on`.`player_id` AS `online` FROM `players` p LEFT JOIN `players_online` p_on ON `p`.`id` = `p_on`.`player_id` WHERE `p`.`group_id` < 2 ORDER BY `p`.`experience`-`p`.`exphist_lastexp` DESC LIMIT "
(query - SQL error)
Type: select_multi (select multiple rows from database)
Thanks @Peonso But what I have to add to my database? And to my globalevents :)?
 
Last edited:
Code:
string(334) "SELECT `p`.`name`, `p`.`level`, `p`.`vocation`, `p`.`experience`, `p`.`exphist1`, `p`.`exphist2`, `p`.`exphist3`, `p`.`exphist_lastexp`, `p_on`.`player_id` AS `online` FROM `players` p LEFT JOIN `players_online` p_on ON `p`.`id` = `p_on`.`player_id` WHERE `p`.`group_id` < 2 ORDER BY `p`.`experience`-`p`.`exphist_lastexp` DESC LIMIT "
(query - SQL error)
Type: select_multi (select multiple rows from database)

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
@Peonso I add it but I still have this problem.
 
Code:
string(334) "SELECT `p`.`name`, `p`.`level`, `p`.`vocation`, `p`.`experience`, `p`.`exphist1`, `p`.`exphist2`, `p`.`exphist3`, `p`.`exphist_lastexp`, `p_on`.`player_id` AS `online` FROM `players` p LEFT JOIN `players_online` p_on ON `p`.`id` = `p_on`.`player_id` WHERE `p`.`group_id` < 2 ORDER BY `p`.`experience`-`p`.`exphist_lastexp` DESC LIMIT "
(query - SQL error)
Type: select_multi (select multiple rows from database)

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
@Peonso I add it but I still have this problem.
Are you using this?
(globalevent, querys)
https://github.com/att3/ZnoteAAC/commit/dd270ed12f73c6db850c7482b39bface75ec07a4
 
@Evil Puncker When I put it to my characterprofile it show same EXP history for all players. for example: Player x get 200.000. Player y get 200.000. And It's wrong, because only x get this EXP. What I have to change?
PHP:
<?php
$powergamers = $config['powergamers'];
$limit = 1;
$type = @$_GET['type'];
function coloured_value($valuein)
{
    $value2 = $valuein;
    while(strlen($value2) > 3)
    {
        $value .= '.'.substr($value2, -3, 3);
        $value2 = substr($value2, 0, strlen($value2)-3);
    }
    @$value = $value2.$value;
    if($valuein > 0)
        return '<b><font color="green">+'.$value.'</font></b>';
    elseif($valuein < 0)
        return '<font color="red">'.$value.'</font>';
    else
        return $value;
}
if(empty($type))
    $players = mysql_select_multi('SELECT `p`.`name`, `p`.`level`, `p`.`vocation`, `p`.`experience`, `p`.`exphist1`, `p`.`exphist2`, `p`.`exphist3`, `p`.`exphist_lastexp`, `p_on`.`player_id` AS `online` FROM `players` p LEFT JOIN `players_online` p_on ON `p`.`id` = `p_on`.`player_id` WHERE `p`.`group_id` < 2 ORDER BY `p`.`experience`-`p`.`exphist_lastexp` DESC LIMIT ' . $limit);
elseif($type == "sum")
    $players = mysql_select_multi('SELECT `p`.*, `p_on`.`player_id` AS online FROM `players` p LEFT JOIN `players_online` p_on ON `p`.`id` = `p_on`.`experience`-`p`.`exphist_lastexp` DESC LIMIT ' . $limit);
elseif($type >= 1 && $type <= 7)
    $players = mysql_select_multi('SELECT `p`.*, `p_on`.`player_id` AS online FROM `players` p LEFT JOIN `players_online` p_on ON `p`.`id` = `p_on`.`player_id` WHERE `p`.`group_id` < 2 ORDER BY `p`.`exphist' . (int) $type . '` DESC LIMIT '.$limit);
if($player)
    foreach($players as $player)
    {
    echo coloured_value($player['experience']-$player['exphist_lastexp']);
    }
    ;
    ?>
 
Back
Top