• 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!

Gesior Houses.php Error - TFS 0.4 - 8.6

hanzoha

New Member
Joined
May 8, 2016
Messages
87
Reaction score
2
I have a problem in the file houses.php

When I look for cities with empty houses everything is ok. But when I select a city where there's a House with an owner the gesior crashes and this appear.

Fatal error: Call to a member function createObject() on a non-object in C:\pages\houses.php on line 107
{main}( ) ..\index.php:0
include_once( 'C:\system\load.page.php' ) ..\index.php:37
include( 'C:\pages\houses.php' ) ..\load.page.php:7

Could someone help me? Thanks!
 
These are the lines where the error is:

Code:
                        $houses_sql = $SQL->query('SELECT * FROM houses WHERE world_id = '.$world_id.' AND town = '.$town_id.''.$owner_sql.''.$status_sql.' ORDER BY '.$order_sql.' DESC')->fetchAll();
                        $counter = 0;
                        foreach($houses_sql as $house)
                        {
                                if(is_int($counter / 2))
                                        $bgcolor = $config['site']['lightborder'];
                                else
                                        $bgcolor = $config['site']['darkborder'];
                                $counter++;
                                if($house['owner'] == 0)
                                {
                                        $owner = 'Empty';
                                }
                                elseif($house['owner'] > 0)
                                {
                                        $ots;
                                        $player = $ots->createObject('Player');
                                        $player->load($house['owner']);
                                        $owner = 'Rented by <a href="?subtopic=characters&name='.urlencode($player->getName()).'">'.$player->getName().'</a>';
                                }
                                $main_content .= '<tr bgcolor="'.$bgcolor.'">
                                        <td>'.$house['name'].'</td>
                                        <td>'.$house['size'].' sqm</td>
                                        <td>'.$house['rent'].' gold</td>
                                        <td>'.$owner.'</td>
                                        <td><a href="index.php?subtopic=houses&show='.$house['id'].'"><image src="'.$layout_name.'/images/buttons/sbutton_view.gif"</a></td>
                                </tr>';
                        }

Could someone help me? Or does someone knows a Gesior 2012 version with shopsystem for TFS 0.4 that I can download? Thx!
 
Back
Top Bottom