SwiftEMU Failed to add guild petitions for guild ID:

Results 1 to 7 of 7
  1. #1
    Newbie Innorman is offline
    MemberRank
    Oct 2010 Join Date
    15Posts

    angry SwiftEMU Failed to add guild petitions for guild ID:

    I have a problem with badges of groups :


    But I followed this tutorial to the letter : http://forum.ragezone.com/f335/fix-h...badges-914837/

    And the example badge work look : http://207.254.9.2/habbo-imaging/bad...4014s18014.gif

    Configuration.ini :

    ## Hotel Link; To Stream Images
    guilds.link=http://207.254.9.2/habbo-imaging/badge/
    stream.link=http://207.254.9.2/habbo-imaging/head/

    My external_variable : group.badge.url=http://207.254.9.2/habbo-imaging/badge/%imagerdata%.gif

    My .htaccess in the root :
    RewriteEngine On
    RewriteRule ^habbo-imaging/badge/([^/]+) /habbo-imaging/badge.php?badge=$1
    RewriteRule ^habbo-imaging/head/([^/]+) /habbo-imaging/head.php?figure=$1


  2. #2
    Sorcerer Supreme AKllX is offline
    Member +Rank
    Aug 2007 Join Date
    @ akllxprojectLocation
    366Posts

    Re: SwiftEMU Failed to add guild petitions for guild ID:

    Replace your public MyGuild LoadGuild(int GuildId, bool isReloading) with the following

    Code:
    public MyGuild LoadGuild(int GuildId, bool isReloading)        {
    
    
                using (IQueryAdapter adapter = ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
                    {
                        adapter.setQuery("SELECT * FROM groups WHERE Id = '" + GuildId + "' LIMIT 1");
                        DataRow row = adapter.getRow();
                        if (row == null)
                        {
                            return null;
                        }
                        List<int> guildstates = new List<int>();
                        foreach (string str in row["GuildStates"].ToString().Split(new char[] { ';' }))
                        {
                            try
                            {
                                if (!String.IsNullOrEmpty(str))
                                {
                                    guildstates.Add(int.Parse(str));
                                }
                            }
                            catch
                            {
                                Console.WriteLine("Failed to add guild states for guild ID: " + GuildId);
                            }
                        }
                        List<int> petitions = new List<int>();
                        foreach (string str2 in row["Petitions"].ToString().Split(new char[] { ';' }))
                        {
                            try
                            {
                                int pet = int.Parse(str2);
                                if (!String.IsNullOrEmpty(str2))
                                {
                                    petitions.Add(pet);
                                }
                            }
                            catch
                            {
                                Console.WriteLine("Failed to add guild petitions for guild ID: " + GuildId);
                            }
                        }
                        Dictionary<int, int> guildranks = new Dictionary<int, int>();
                        Dictionary<int, string> members = new Dictionary<int, string>();
                        adapter.setQuery("SELECT * FROM user_groups WHERE GroupId = '" + GuildId + "'");
                        DataTable table = adapter.getTable();
                        foreach (DataRow row2 in table.Rows)
                        {
                            members.Add((int)row2["UserId"],(string)row2["GroupDate"]);
                            guildranks.Add((int)row2["UserId"], (int)row2["Rank"]);
                        }
                        MyGuild g = new MyGuild(GuildId, ButterflyEnvironment.FilterInjectionChars(row["Name"].ToString()), (int)row["OwnerId"], row["OwnerName"].ToString(), ButterflyEnvironment.FilterInjectionChars(row["Description"].ToString()), (int)row["RoomId"], row["Image"].ToString(), (int)row["CustomColor1"], (int)row["CustomColor2"], (int)row["GuildBase"], (int)row["GuildBaseColor"], guildstates, row["HtmlColor1"].ToString(), row["HtmlColor2"].ToString(), row["DateCreated"].ToString(), members, petitions, (int)row["Typee"], (int)row["RightsType"], guildranks);
                        this.QueueAddGuild(g);
                        return g;
                }
            }
    Keep in mind that the guild is very bad coded. I just managed to make it stable. Still, it's querys uses lots of memory and CPU. Thus, they might get a little out of control for a high number of users in a group.

  3. #3
    Newbie Innorman is offline
    MemberRank
    Oct 2010 Join Date
    15Posts

    Re: SwiftEMU Failed to add guild petitions for guild ID:


    I change this with Visual Studio 2012 and I have the same problem



    Last edited by Innorman; 31-07-13 at 10:02 PM.

  4. #4
    Newbie Innorman is offline
    MemberRank
    Oct 2010 Join Date
    15Posts

    Re: SwiftEMU Failed to add guild petitions for guild ID:

    Up

  5. #5
    Sorcerer Supreme AKllX is offline
    Member +Rank
    Aug 2007 Join Date
    @ akllxprojectLocation
    366Posts

    SwiftEMU Failed to add guild petitions for guild ID:

    I've lost the fix for that, posted in some brazillian forum but couldn't find. Ripping the Load Guild from revision 2 should work


    Sent from my iPad using Tapatalk 2

  6. #6
    Newbie Innorman is offline
    MemberRank
    Oct 2010 Join Date
    15Posts

    Re: SwiftEMU Failed to add guild petitions for guild ID:

    I fixed him :) ! Thank you for your help !
    Last edited by Innorman; 01-08-13 at 09:56 PM.

  7. #7
    Newbie Mr.Abbott is offline
    MemberRank
    Oct 2008 Join Date
    13Posts

    Re: SwiftEMU Failed to add guild petitions for guild ID:

    Quote Originally Posted by Innorman View Post
    I fixed him :) ! Thank you for your help !
    I have the same error, can u tell me the fix?



Advertisement