Error when guards are attacking monsters...

09/04/2011 18:33 HerpDerpNigga#1
i have a problem, when guards are attacking monsters, this error appears in my console, every time a guard attacks a monster, this error shows up on my console...
i think its something wrong with the cps drop, like when guards are attacking, they earn cps or something like that, this is what i think...
Any clue? thanks.

[Only registered and activated users can see links. Click Here To Register...]
09/04/2011 19:02 F i n c h i#2
Check your guard's attack type...It has something to do with it too.
09/04/2011 20:55 pro4never#3
Based on the fact it has to do with MonsterInformation.Drop it is definitely most likely that the CP's value for the guard is null.

When adding the cps make sure the entity flag is player.

That and/or before adding cps make sure Cps != null
09/05/2011 07:25 BaussHacker#4
Quote:
Originally Posted by pro4never View Post
Based on the fact it has to do with MonsterInformation.Drop it is definitely most likely that the CP's value for the guard is null.

When adding the cps make sure the entity flag is player.

That and/or before adding cps make sure Cps != null
An integer can never be null within a method. It can be null, if he's calling it from another class/struct or whatever, but as long is a variable within the method, which CPs most likely are, when it's for dropping. Well, then it will never be null, because it has to have a value, before using it, otherwise the compiler will throw following error:
Code:
Use of unassigned local variable 'variablename'
09/05/2011 14:08 pro4never#5
Ahem what I meant to say was the code INSIDE of his cps code.

I'm assuming he's using trinity or something where it has a billion get/set accessors for every possible thing that needs doing. It's the most obvious thing I can think of where it's trying to send an update packet to the entity cause it considers it a player but the socket connection is null.
09/05/2011 21:59 HerpDerpNigga#6
Well, sometimes when I log in, the console throws this error:

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

So I checked the 831 line in GameState.cs, here it is:
The red line is the 831 line where the errors is
Code:
public Game.Map Map
        {
            get
            {
                if (map == null)
                {
                    [COLOR="Red"][B]ServerBase.Kernel.Maps.TryGetValue(Entity.MapID, out map);[/B][/COLOR]
                    if (Entity.MapID >= 11000 && map == null)
                        Entity.MapID = 1005;
                    if (map == null)
                        return (map = new Conquer_Online_Server.Game.Map(Entity.MapID, Database.MapsTable.MapInformations[Entity.MapID].BaseID, Database.DMaps.MapPaths[Database.MapsTable.MapInformations[Entity.MapID].BaseID], false));
                }
                else
                {
                    if (map.ID != Entity.MapID)
                    {
                        ServerBase.Kernel.Maps.TryGetValue(Entity.MapID, out map);
                        if (Entity.MapID >= 11000 && map == null)
                            Entity.MapID = 1005;
                        if (map == null)
                            return (map = new Conquer_Online_Server.Game.Map(Entity.MapID, Database.MapsTable.MapInformations[Entity.MapID].BaseID, Database.DMaps.MapPaths[Database.MapsTable.MapInformations[Entity.MapID].BaseID], false));
                    }
                }
                return map;
            }
        }
How can TC be a null map?

I checked the 58 line in Screen.cs, here it is:
The red line is the 58 line where the error is
Code:
[COLOR="Red"][B]if (Owner.Map.FreezeMonsters)[/B][/COLOR]
                        return;
                    for (int c = 0; c < Objects.Count; c++)
Why does TC freezes my monsters or w/e the 58 line says?
Thanks
09/05/2011 22:03 pro4never#7
umm...

It sounds to me like it's saying..


"If my map is not set to anything... try to set it to something from the Kernel.Maps collection"
09/05/2011 22:10 HerpDerpNigga#8
Quote:
Originally Posted by pro4never View Post
umm...

It sounds to me like it's saying..


"If my map is not set to anything... try to set it to something from the Kernel.Maps collection"
Any idea how can I fix this, or is this affecting with something in game, while playing?
Thanks