[SWIFT-EMU] Profiles wont work in client please help asap thank you!

Results 1 to 9 of 9
  1. #1
    Member Nate Curry is offline
    MemberRank
    Dec 2012 Join Date
    80Posts

    ! [SWIFT-EMU] Profiles wont work in client please help asap thank you!

    when you click on someones profile tab it dont work also if you click on (my-profile) it dont pop up but says it in the emu.


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

    Re: [SWIFT-EMU] Profiles wont work in client please help asap thank you!

    Make sure that there is in every field for the users table a value. Missing values might throw errors.

  3. #3
    Member Nate Curry is offline
    MemberRank
    Dec 2012 Join Date
    80Posts

    Re: [SWIFT-EMU] Profiles wont work in client please help asap thank you!

    Quote Originally Posted by HillBilly View Post
    Make sure that there is in every field for the users table a value. Missing values might throw errors.
    yeah everything has a default value any other choice?

  4. #4
    Gaby is offline
    MemberRank
    Apr 2013 Join Date
    Viva HollandiaLocation
    1,607Posts

    Re: [SWIFT-EMU] Profiles wont work in client please help asap thank you!

    Is your user_info table filled with your users? Otherwise just tell me the structure of your user_info table, I'll give you a PHP script which you need to run once, after that your profiles will work. :)

  5. #5
    Member Nate Curry is offline
    MemberRank
    Dec 2012 Join Date
    80Posts

    Re: [SWIFT-EMU] Profiles wont work in client please help asap thank you!

    Quote Originally Posted by BaasHotel View Post
    Is your user_info table filled with your users? Otherwise just tell me the structure of your user_info table, I'll give you a PHP script which you need to run once, after that your profiles will work. :)
    its the client not the cms or page and the user_infos correct

  6. #6
    Gaby is offline
    MemberRank
    Apr 2013 Join Date
    Viva HollandiaLocation
    1,607Posts

    Re: [SWIFT-EMU] Profiles wont work in client please help asap thank you!

    Quote Originally Posted by Nate Curry View Post
    its the client not the cms or page and the user_infos correct
    Trust me, it's the user_info. :P

  7. #7
    Member Nate Curry is offline
    MemberRank
    Dec 2012 Join Date
    80Posts

    Re: [SWIFT-EMU] Profiles wont work in client please help asap thank you!

    Quote Originally Posted by BaasHotel View Post
    Trust me, it's the user_info. :P
    the user_info? whats what do with profiles in the client.

  8. #8
    Gaby is offline
    MemberRank
    Apr 2013 Join Date
    Viva HollandiaLocation
    1,607Posts

    Re: [SWIFT-EMU] Profiles wont work in client please help asap thank you!

    Quote Originally Posted by Nate Curry View Post
    the user_info? whats what do with profiles in the client.
    This:
    Code:
            internal void LoadProfile()
            {
                try
                {
                    int num = this.Request.PopWiredInt32();
                    bool flag = this.Request.PopWiredBoolean();
                    Habbo habbo = ButterflyEnvironment.getHabboForId((uint)num);
                    if (habbo == null)
                    {
                        Console.WriteLine("can't get data for profile with userid = " + num);
                    }
                    else
                    {
                        DataRow Info;
                        using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
                        {
                            adapter.setQuery("SELECT `reg_timestamp` FROM `user_info` WHERE user_id = '" + habbo.Id + "'");
                            Info = adapter.getRow();
                        }
                        TimeSpan span = (TimeSpan)(DateTime.Now - Convert.ToDateTime(habbo.LastOnline));
                        List<MyGuild> list = new List<MyGuild>();
                        foreach (int num2 in habbo.ImGuilds)
                        {
                            MyGuild item = ButterflyEnvironment.GetGame().GetGuilds().GetGuild(num2);
                            if (!((item == null) || list.Contains(item)))
                            {
                                list.Add(item);
                            }
                        }
                        this.Response.Init(Outgoing.ProfileInformation);
                        this.Response.AppendInt32(habbo.Id);
                        this.Response.AppendString(habbo.Username);
                        this.Response.AppendString(habbo.Look);
                        this.Response.AppendString(habbo.Motto);
                        this.Response.AppendString(UnixTimeStampToDateTime((double)Info["reg_timestamp"]).ToShortDateString());
                        this.Response.AppendInt32(habbo.AchievementPoints);
                        this.Response.AppendInt32(habbo.GetMessenger().myFriends);
                        this.Response.AppendBoolean(habbo.Id != this.Session.GetHabbo().Id);
                        this.Response.AppendBoolean(false);
                        this.Response.AppendBoolean(ButterflyEnvironment.GetGame().GetClientManager().GetClientByUserID(habbo.Id) != null);
                        this.Response.AppendInt32(list.Count);
                        foreach (MyGuild guild2 in list)
                        {
                            this.Response.AppendInt32(guild2.Id);
                            this.Response.AppendString(guild2.Name);
                            this.Response.AppendString(guild2.Image);
                            this.Response.AppendString(guild2.HtmlColor1);
                            this.Response.AppendString(guild2.HtmlColor2);
                            this.Response.AppendBoolean(habbo.FavoriteGuild == guild2.Id);
                        }
                        //this.Response.AppendInt32((int)span.TotalSeconds);
                        //this.Response.AppendBoolean(true);
                        this.Response.AppendBoolean(false);
                        this.Response.AppendInt32((int)span.TotalSeconds);
                        this.Response.AppendBoolean(true);
                        this.SendResponse();
                    }
                }
                catch
                {
                }
            }
    However, if you want to fix your profiles, do this:
    You need to create a new page in your CMS and paste this script in. Visit the page once, if the script was succesfull and your user_info is filled, delete the page.

  9. #9
    Member Nate Curry is offline
    MemberRank
    Dec 2012 Join Date
    80Posts

    Re: [SWIFT-EMU] Profiles wont work in client please help asap thank you!

    Quote Originally Posted by BaasHotel View Post
    This:
    Code:
            internal void LoadProfile()
            {
                try
                {
                    int num = this.Request.PopWiredInt32();
                    bool flag = this.Request.PopWiredBoolean();
                    Habbo habbo = ButterflyEnvironment.getHabboForId((uint)num);
                    if (habbo == null)
                    {
                        Console.WriteLine("can't get data for profile with userid = " + num);
                    }
                    else
                    {
                        DataRow Info;
                        using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
                        {
                            adapter.setQuery("SELECT `reg_timestamp` FROM `user_info` WHERE user_id = '" + habbo.Id + "'");
                            Info = adapter.getRow();
                        }
                        TimeSpan span = (TimeSpan)(DateTime.Now - Convert.ToDateTime(habbo.LastOnline));
                        List<MyGuild> list = new List<MyGuild>();
                        foreach (int num2 in habbo.ImGuilds)
                        {
                            MyGuild item = ButterflyEnvironment.GetGame().GetGuilds().GetGuild(num2);
                            if (!((item == null) || list.Contains(item)))
                            {
                                list.Add(item);
                            }
                        }
                        this.Response.Init(Outgoing.ProfileInformation);
                        this.Response.AppendInt32(habbo.Id);
                        this.Response.AppendString(habbo.Username);
                        this.Response.AppendString(habbo.Look);
                        this.Response.AppendString(habbo.Motto);
                        this.Response.AppendString(UnixTimeStampToDateTime((double)Info["reg_timestamp"]).ToShortDateString());
                        this.Response.AppendInt32(habbo.AchievementPoints);
                        this.Response.AppendInt32(habbo.GetMessenger().myFriends);
                        this.Response.AppendBoolean(habbo.Id != this.Session.GetHabbo().Id);
                        this.Response.AppendBoolean(false);
                        this.Response.AppendBoolean(ButterflyEnvironment.GetGame().GetClientManager().GetClientByUserID(habbo.Id) != null);
                        this.Response.AppendInt32(list.Count);
                        foreach (MyGuild guild2 in list)
                        {
                            this.Response.AppendInt32(guild2.Id);
                            this.Response.AppendString(guild2.Name);
                            this.Response.AppendString(guild2.Image);
                            this.Response.AppendString(guild2.HtmlColor1);
                            this.Response.AppendString(guild2.HtmlColor2);
                            this.Response.AppendBoolean(habbo.FavoriteGuild == guild2.Id);
                        }
                        //this.Response.AppendInt32((int)span.TotalSeconds);
                        //this.Response.AppendBoolean(true);
                        this.Response.AppendBoolean(false);
                        this.Response.AppendInt32((int)span.TotalSeconds);
                        this.Response.AppendBoolean(true);
                        this.SendResponse();
                    }
                }
                catch
                {
                }
            }
    However, if you want to fix your profiles, do this:
    You need to create a new page in your CMS and paste this script in. Visit the page once, if the script was succesfull and your user_info is filled, delete the page.
    Keeps saying query2 wasn't succesful

    and were do i put that code ?

    i think it worked but now will it keep entering it by its self for every new user?



Advertisement