Guild Problem

03/05/2011 16:26 Pro4Never2#1
Hello, i'm using a 5165 (Leveling)
it's ProjectX but For Leveling.

well, i started on it there's 2h

i logged in, walking in twincity and clack, everything stoped, and this error appeared

[Only registered and activated users can see links. Click Here To Register...]

Guilds.cs

Guilds.dat
03/05/2011 17:51 stealarcher#2
Most likely the file stream isnt being closed after 1 save, so the next save it cant read it again. Search for FS.Close();, if u cant find it, thats the issue.
03/05/2011 18:46 Iron~Man#3
Replace this
Code:
 public static void LoadGuilds() 
        { 
            if (File.Exists(@"C:\OldCODB\Guilds.dat")) 
            { 
                FileStream FS = new FileStream(@"C:\OldCODB\Guilds.dat", FileMode.Open); 
                BinaryReader BR = new BinaryReader(FS); 
                int GuildsCount = BR.ReadInt32(); 
                for (int i = 0; i < GuildsCount; i++) 
                { 
                    Guild G = new Guild(BR); 
                    AllTheGuilds.Add(G.GuildID, G); 
                } 
                GuildWars.LastWinner = (Guild)AllTheGuilds[BR.ReadUInt16()]; 
            } 
        }
with this

Code:
 public static void LoadGuilds() 
        { 
            if (File.Exists(@"C:\OldCODB\Guilds.dat")) 
            { 
                FileStream FS = new FileStream(@"C:\OldCODB\Guilds.dat", FileMode.Open); 
                BinaryReader BR = new BinaryReader(FS); 
                int GuildsCount = BR.ReadInt32(); 
                for (int i = 0; i < GuildsCount; i++) 
                { 
                    Guild G = new Guild(BR); 
                    AllTheGuilds.Add(G.GuildID, G); 
                } 
                GuildWars.LastWinner = (Guild)AllTheGuilds[BR.ReadUInt16()]; 
                BR.Close();
                FS.Close();
            } 
        }

Here we go again sohaib, one NPC Release, 10 requests? Is that how you are not like 1 month ago?
03/05/2011 19:14 stealarcher#4
Quote:
Originally Posted by Iron~Man View Post
Here we go again sohaib, one NPC Release, 10 requests? Is that how you are not like 1 month ago?
At least hes trying to learn, unlike many others on these forums.
03/05/2011 19:22 Iron~Man#5
Quote:
Originally Posted by stealarcher View Post
At least hes trying to learn, unlike many others on these forums.
Doing the one thing you learnt(Doing NPCs) all the time Isn't trying to learn.
03/05/2011 19:25 Pro4Never2#6
doing my maximaun sry, but be sure, i don't request like a donkey anymore, i'm trying to fix it be4 requesting help
03/05/2011 19:30 stealarcher#7
Quote:
Originally Posted by Iron~Man View Post
Doing the one thing you learnt(Doing NPCs) all the time Isn't trying to learn.
You have to start somewhere, and this isnt for NPCs. This is for guilds, so obviously hes working on other things as well.
03/05/2011 19:33 Iron~Man#8
And You Didn't thank me for my fix.. Jesus Christ..

#edit
Pardon, Allah.
03/05/2011 19:35 stealarcher#9
Lmfao, you didnt even post the fix first, god damn. you really are a prick.
03/05/2011 20:18 Iron~Man#10
Quote:
Originally Posted by stealarcher View Post
Lmfao, you didnt even post the fix first, god damn. you really are a prick.
Even If I am, That's none of your business.