Loosing items

KimStar

Habbo Guardian
Feb 18, 2012
273
57
When my users disconnecting my hotel, they loose all items in the Inventory.

We are running Firewind 1.0.8
 

JayC

Well-Known Member
Aug 8, 2013
5,505
1,401
Look for an error in the log files not the emulator. It's creating the items , putting them into the array, but not writing the data to the database
 

KimStar

Habbo Guardian
Feb 18, 2012
273
57
Theres many logs files. The MySQLerrors says:
hotel.getuseritems does not exist at MySql.Data-MySqlClient.MySqlStream.ReadPacket()
Look for an error in the log files not the emulator. It's creating the items , putting them into the array, but not writing the data to the database
 

KimStar

Habbo Guardian
Feb 18, 2012
273
57
This is the same all over the log
Code:
03-04-2018 04:33:46Error in query:
CALL getuseritems(613241)
MySql.Data.MySqlClient.MySqlException (0x80004005): PROCEDURE rapid.getuseritems does not exist
   at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
   at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
   at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
   at Database_Manager.Database.Session_Details.QueryAdapter.getTable()
 

Bjork

Member
Feb 7, 2012
73
29
Run that to your MySQL database:
Code:
CREATE DEFINER=`root`@`localhost` PROCEDURE `getroomitems` (IN `roomid` INT(10) UNSIGNED)  BEGIN

 SELECT items_rooms.item_id, items_rooms.x, items_rooms.y, items_rooms.n, items_rooms.w, items.base_id, items_extradata.data, items_rooms_owners.owner_id

 FROM items_rooms

 JOIN items ON (items.item_id = items_rooms.item_id)

 LEFT JOIN items_extradata ON (items_extradata.item_id = items.item_id)

 LEFT JOIN items_rooms_owners ON (items_rooms_owners.item_id = items.item_id)

 WHERE items_rooms.room_id = roomid;

END$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `getuseritems` (IN `userid` INT(10) UNSIGNED)  BEGIN

 SELECT items_users.item_id, items.base_id, items_extradata.data

 FROM items_users

 JOIN items ON (items.item_id = items_users.item_id)

 LEFT JOIN items_extradata ON (items_extradata.item_id = items.item_id)

 WHERE items_users.user_id = userid;

END$$

DELIMITER ;
 

KimStar

Habbo Guardian
Feb 18, 2012
273
57
WHERE items_rooms.room_id = roomid;
[Err] 1064 - 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 13
 

Bjork

Member
Feb 7, 2012
73
29
Okey, what's your emulator ?

You can try this one:
Code:
-- ----------------------------
-- Procedure structure for `getroomitems`
-- ----------------------------
DROP PROCEDURE IF EXISTS `getroomitems`;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `getroomitems`(IN `roomid` INT(10) UNSIGNED)
BEGIN
SELECT items_rooms.item_id, items_rooms.x, items_rooms.y, items_rooms.n, items.base_id, items_extradata.data, items.rareid, items.group_data, items.placedBy
FROM items_rooms
JOIN items ON (items.item_id = items_rooms.item_id)
LEFT JOIN items_extradata ON (items_extradata.item_id = items.item_id)
WHERE items_rooms.room_id = roomid;
END
;;
DELIMITER ;

-- ----------------------------
-- Procedure structure for `getuseritems`
-- ----------------------------
DROP PROCEDURE IF EXISTS `getuseritems`;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `getuseritems`(IN userid int(10) unsigned)
BEGIN
SELECT items_users.item_id, items.base_id, items_extradata.data, items.rareid, items.group_data
FROM items_users
JOIN items ON (items.item_id = items_users.item_id)
LEFT JOIN items_extradata ON (items_extradata.item_id = items.item_id)
WHERE items_users.user_id = userid;
END
;;
DELIMITER ;
 

Users who are viewing this thread

Top