Silverwave (PlusEMU) Critical Error

Results 1 to 9 of 9
  1. #1
    Member HabbitBE is offline
    MemberRank
    Apr 2013 Join Date
    52Posts

    Silverwave (PlusEMU) Critical Error

    Hi guys,

    Some users on my hotel get a CRITICAL ERROR.
    That's what is being displayed on my EMU.
    In the ERRORLOG stands this:
    Code:
    Bug duing user login: System.InvalidCastException: Unable to cast object of type 'System.Int32' to type 'System.String'.   at Silverwave.HabboHotel.Users.UserDataManagement.UserDataFactory.GetUserData(String sessionTicket, String ip, Byte& errorCode) in e:\Documents\Emulator [L]\Emulator [L]\Plus Emulator\HabboHotel\Users\UserData\UserDataFactory.cs:line 270
       at Silverwave.HabboHotel.GameClients.GameClient.tryLogin(String AuthTicket) in e:\Documents\Emulator [L]\Emulator [L]\Plus Emulator\HabboHotel\GameClients\GameClient.cs:line 133
    When i got to UserDataFactory.cs on that line stands this.
    Code:
    if (!DBNull.Value.Equals(dRow[4]))
                        extraData = (string)dRow[4];
    And when i go to GameClient.cs on that line stands this.
    Code:
       UserData userData = UserDataFactory.GetUserData(AuthTicket, ip, out errorCode);
                    if (errorCode == 1)
    Does anyone know something to fix this ?

    Kind Regards,
    HabbitBE


  2. #2
    Member Japaojp is offline
    MemberRank
    Nov 2011 Join Date
    BrazilLocation
    95Posts

    Re: Silverwave (PlusEMU) Critical Error

    Replace it:
    Code:
    if (!DBNull.Value.Equals(dRow[4]))
                        extraData = (string)dRow[4];
    For it:
    Code:
    if (!DBNull.Value.Equals(dRow[4]))
                        extraData = (int)dRow[4];
    I'm not sure, tell me if it work.

  3. #3
    Member HabbitBE is offline
    MemberRank
    Apr 2013 Join Date
    52Posts

    Re: Silverwave (PlusEMU) Critical Error

    It gives me the error : Cannot implicity convert type 'int' to 'string'

  4. #4
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,610Posts

    Re: Silverwave (PlusEMU) Critical Error

    Why would you convert it to a int as extra data CAN contain other characters too...

  5. #5
    Member HabbitBE is offline
    MemberRank
    Apr 2013 Join Date
    52Posts

    Re: Silverwave (PlusEMU) Critical Error

    Can the error be in the SQL ? or something ?

  6. #6
    Member Japaojp is offline
    MemberRank
    Nov 2011 Join Date
    BrazilLocation
    95Posts

    Re: Silverwave (PlusEMU) Critical Error

    I was just trying to help. Can I?

    So, I can't help you!

  7. #7
    Member HabbitBE is offline
    MemberRank
    Apr 2013 Join Date
    52Posts

    Re: Silverwave (PlusEMU) Critical Error

    Quote Originally Posted by Japaojp View Post
    I was just trying to help. Can I?

    So, I can't help you!
    Ok, thanks.
    It's not a problem that you cannot help me, i hope someone else can.

  8. #8
    Account Upgraded | Title Enabled! Chapo is offline
    MemberRank
    Jul 2010 Join Date
    United StatesLocation
    944Posts

    Re: Silverwave (PlusEMU) Critical Error

    There are 3 ways to solve this problem.

    1). Go to your database -> items -> Edit structure.. Now you see extra_data with the type integer (int) change it to varchar.
    2). Change all extra data strings to integers.
    3). Find a other database or download other emu w/ db.

  9. #9
    Member HabbitBE is offline
    MemberRank
    Apr 2013 Join Date
    52Posts

    Re: Silverwave (PlusEMU) Critical Error

    Quote Originally Posted by Ryan View Post
    There are 3 ways to solve this problem.

    1). Go to your database -> items -> Edit structure.. Now you see extra_data with the type integer (int) change it to varchar.
    2). Change all extra data strings to integers.
    3). Find a other database or download other emu w/ db.
    Ryan my friend, you are a hero :)
    I tryed the first way and it worked perfect :D.
    THANKS !

    Do you also know a fix for the bug that says. "Sorry, this item is already placed in this room." ?



Advertisement