EDIT: Nevermind I just missed to include maxwill_before in my query. Duh.
Hey guys so I got snikos property mod and it works great apart from on view user.
When I go to viewuser I get this:
Sorry, we could not find a user with that ID, check your source.
It's clearly just a sql error but it's been racking at my brains for a good 2 hours.
Here's my query
$q =
$db->query(
"SELECT *
FROM `users` `u`
INNER JOIN `cities` AS `c`
ON `u`.`location` = `c`.`cityid`
INNER JOIN `houses` AS `h`
ON `u`.`maxwill` = h.`hWILL`
LEFT JOIN `gangs` AS `g`
ON `g`.`gangID` = `u`.`gang`
LEFT JOIN `fedjail` AS `f`
ON `f`.`fed_userid` = `u`.`userid`
WHERE `u`.`userid` = {$_GET['u']}");
if ($db->num_rows($q) == 0)
{
$db->free_result($q);
echo 'Sorry, we could not find a user with that ID, check your source.';
}
In globals I have this:
if ($housequery)
{
$is=$db->query("SELECT u.*,us.*,h.* FROM users u LEFT JOIN
userstats us ON
u.userid=us.userid LEFT JOIN
houses h ON h.hWILL=
100
WHERE u.userid=$userid");
}
else
{
$is =
$db->query(
"SELECT `u`.*, `us`.*
FROM `users` AS `u`
INNER JOIN `userstats` AS `us`
ON `u`.`userid`=`us`.`userid`
WHERE `u`.`userid` = {$userid}
LIMIT 1");
}
$ir = $db->fetch_row($is);
include_once('property_mod_globals.php');
if(array_key_exists('hNAME', $ir)) {
$ir['hNAME'] = ($ir['houseid_row'] > 0) ? get_house_name_by_row($ir['houseid_row']) :
$ir['hNAME'];
}
The error only shows if the player is using a house from the new property system.
If anyone can help me out that'd be great! :D