I need help with this Plus Emu Bug...

HonkyWam

Tickle me Elmo!
Dec 8, 2011
289
4
Well, first of all when you get on client on the emulator it pops up critical error logged. I checked my Critical Exceptions and I got this

Code:
Bug duing user login: System.FormatException: Input string was not in a correct format.
  at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
  at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
  at Silverwave.HabboHotel.Users.Authenticator.HabboFactory.GenerateHabbo(DataRow dRow, DataRow mRow, List`1 group) in C:\Users\root\Desktop\Silverwave\Silverwave Emulator\HabboHotel\Users\Authenticator\Authenticator.cs:line 43
  at Silverwave.HabboHotel.Users.UserDataManagement.UserDataFactory.GetUserData(String sessionTicket, String ip, Byte& errorCode) in C:\Users\root\Desktop\Silverwave\Silverwave Emulator\HabboHotel\Users\UserData\UserDataFactory.cs:line 440
  at Silverwave.HabboHotel.GameClients.GameClient.tryLogin(String AuthTicket) in C:\Users\root\Desktop\Silverwave\Silverwave Emulator\HabboHotel\GameClients\GameClient.cs:line 134

Here are the files of the errors are supposibly located just in case you need to check them.

Authenticator.cs
Code:
using System;
using System.Data;
using Silverwave.HabboHotel.GameClients;
using Silverwave.HabboHotel.Groups;
using System.Collections.Generic;

namespace Silverwave.HabboHotel.Users.Authenticator
{
    static class HabboFactory
    {
        internal static Habbo GenerateHabbo(DataRow dRow, DataRow mRow, List<GroupUser> group)
        {
            uint id = Convert.ToUInt32(dRow["id"]);
            string username = (string)dRow["username"];
            string realname = (string)dRow["real_name"];
            uint rank = Convert.ToUInt32(dRow["rank"]);
            string motto = (string)dRow["motto"];
            string look = (string)dRow["look"];
            string gender = (string)dRow["gender"];
            int lastonline = (int)dRow["last_online"];
            int credits = (int)dRow["credits"];
            int activityPoints = (int)dRow["activity_points"];
            double activityPointsLastUpdate = Convert.ToDouble(dRow["activity_points_lastupdate"]);
            bool isMuted = SilverwaveEnvironment.EnumToBool(dRow["is_muted"].ToString());
            uint homeRoom = Convert.ToUInt32(dRow["home_room"]);
            int respect = (Int32)mRow["Respect"];
            int dailyRespect = (int)mRow["DailyRespectPoints"];
            int dailyPetRespect = (int)mRow["DailyPetRespectPoints"];
            bool mtantPenalty = (dRow["mutant_penalty"].ToString() != "0");
            bool blockFriends = SilverwaveEnvironment.EnumToBool(dRow["block_newfriends"].ToString());
            bool AppearOffline = SilverwaveEnvironment.EnumToBool(dRow["hide_online"].ToString());
            bool HideFromRoom = SilverwaveEnvironment.EnumToBool(dRow["hide_inroom"].ToString());
            uint questID = Convert.ToUInt32(mRow["quest_id"]);
            int questProgress = (int)mRow["quest_progress"];
            int achiecvementPoints = (int)mRow["AchievementScore"];
            bool vip = SilverwaveEnvironment.EnumToBool(dRow["vip"].ToString());
            double Createtime = Convert.ToDouble(dRow["account_created"]);
            bool online = SilverwaveEnvironment.EnumToBool(dRow["online"].ToString());
            bool isguide = SilverwaveEnvironment.EnumToBool(dRow["is_guide"].ToString());
            bool Blockwhisper = (dRow["whisper_enabled"].ToString() == "1") ? false : true;
            bool mys = false;
            int key = (int)dRow["key_colour"];
            int Sc = int.Parse(dRow["belcredits"].ToString());
            uint favid = uint.Parse(mRow["groupid"].ToString());
            int LastChange = (int)dRow["last_change"];
            return new Habbo(id, username, realname, rank, motto, look, gender, credits, activityPoints, activityPointsLastUpdate, isMuted,
                homeRoom, respect, dailyRespect, dailyPetRespect, mtantPenalty, blockFriends, questID, questProgress, achiecvementPoints,
                lastonline, AppearOffline, HideFromRoom, vip, Createtime, online, isguide, Blockwhisper, Sc, mys, key, group, favid, LastChange);
        }
    }
}
UserData.cs
Code:
using System.Collections;
using System.Collections.Generic;
using Silverwave.HabboHotel.Items;
using Silverwave.HabboHotel.Pets;
using Silverwave.HabboHotel.Rooms;
using Silverwave.HabboHotel.Users.Badges;
using Silverwave.HabboHotel.Users.Inventory;
using Silverwave.HabboHotel.Users.Subscriptions;
using Silverwave.HabboHotel.Users;
using Silverwave.HabboHotel.Users.Messenger;
using Silverwave.HabboHotel.Achievements;
using Silverwave.HabboHotel.RoomBots;
using Silverwave.HabboHotel.Users.Relationships;

namespace Silverwave.HabboHotel.Users.UserDataManagement
{
    class UserData
    {
        internal uint userID;

        internal Dictionary<string, UserAchievement> achievements;
        internal List<uint> favouritedRooms;
        internal List<uint> ignores;
        internal List<string> tags;
        internal Subscription subscriptions;
        internal List<Badge> badges;
        internal List<UserItem> inventory;
        internal Hashtable inventorySongs;
        internal List<AvatarEffect> effects;
        internal Dictionary<uint, MessengerBuddy> friends;
        internal Dictionary<uint, MessengerRequest> requests;
        internal List<RoomData> rooms;
        internal Dictionary<uint, Pet> pets;
        internal Dictionary<uint, int> quests;
        internal Habbo user;
        internal Dictionary<uint, RoomBot> Botinv;
        internal Dictionary<int, Relationship> Relations;

        public UserData(uint userID, Dictionary<string, UserAchievement> achievements, List<uint> favouritedRooms, List<uint> ignores, List<string> tags,
            Subscription Sub, List<Badge> badges, List<UserItem> inventory, List<AvatarEffect> effects,
            Dictionary<uint, MessengerBuddy> friends, Dictionary<uint, MessengerRequest> requests, List<RoomData> rooms, Dictionary<uint, Pet> pets, Dictionary<uint, int> quests, Hashtable inventorySongs, Habbo user, Dictionary<uint, RoomBot> bots,
            Dictionary<int, Relationship> Relations)
        {
            this.userID = userID;
            this.achievements = achievements;
            this.favouritedRooms = favouritedRooms;
            this.ignores = ignores;
            this.tags = tags;
            this.subscriptions = Sub;
            this.badges = badges;
            this.inventory = inventory;
            this.effects = effects;
            this.friends = friends;
            this.requests = requests;
            this.rooms = rooms;
            this.pets = pets;
            this.quests = quests;
            this.inventorySongs = inventorySongs;
            this.user = user;
            this.Botinv = bots;
            this.Relations = Relations;
        }
    }
}
 

Users who are viewing this thread

Top