• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SOLVED] Just a question

Status
Not open for further replies.

brh11

Respected Member
Hello guys.I am just looking for some people to put there opinions onto this.Okay so when I launch my core this happens http://d.pr/i/8JZl (just a screenshot link).I get that it has something to do with the guid overflow.My question is ,is that In the code there is some highguid functions.If I changed them to lowguid would they make a difference.Im just asking I have no previous Idea on this :p,it looks like highguid.Im getting the hang of c++ now So im going to try and fix this :) thanks for your opinions
 

Jameyboor

Retired Staff
this assertion is triggered:
Code:
case HIGHGUID_UNIT:
        {
            ASSERT(_hiCreatureGuid < 0x00FFFFFE && "Creature guid overflow!");
            return _hiCreatureGuid++;
        }
I do not recommend to delete it from the code at all, instead, clean your creature table, I find it hard to believe you have more than 16777214 actual creatures spawned.
 

brh11

Respected Member
Sorry for the late response.But yes I do agree with you thinking that there's more then the maximum numbers of creatures spawned.I cleared the creature table to make sure and its still happening 0_o.I find that very weird.Thanks for your opinion
 

Parranoia

Insane Member
After clearing the creature table you must also reset the primary key of the table. This can all be done by running this command
Code:
TRUNCATE TABLE `creature`;

THIS WILL DELETE ALL CREATURE SPAWNS
 

brh11

Respected Member
Thanks Parranoia.I Did that and when I started the core back up same thing -_-.Im pretty sure with the creature table truncated and empty,I think something In the script is messing something up :/
 

Tommy

Founder
I never looked at the error, let me see if I can get this correct.

The error is when the program tries to start OutdoorPvP system, perhaps something related to that is causing the GUID miscount. If I'm correct, you have been working on a custom OutdoorPvP script, right? We might want to double check the script or your edits related to that script and make sure nothing was altered that could cause this issue.

Where ever you have 'GenerateLowGuid', it is generating a GUID passed the actual limit. Have you used this anywhere in your custom OutdoorPvP script?
 

Tommy

Founder
No problem.

I believe it has something to do with your 'AddCre' or 'AddCreature" functions. Inside of 'AddCre' you have:

Code:
m_Creatures[type] = MAKE_NEW_GUID(guid, entry, HIGHGUID_UNIT);

My guess is that the guid being used there might be the issue. What you can do is above that line is add a log for example:

Code:
TC_LOG_ERROR(LOG_FILTER_GENERAL, "GUID: %d", guid);

To see how big of a GUID value it is.
 

brh11

Respected Member
Okay tommy.Thanks for that line this is whats happening now,with a clean creature table,truncated everything.It just keeps going on and on
http://d.pr/i/eCbu thats a screenshot.Thanks for helping me!
 

Tommy

Founder
Okay tommy.Thanks for that line this is whats happening now,with a clean creature table,truncated everything.It just keeps going on and on
http://d.pr/i/eCbu thats a screenshot.Thanks for helping me!

That's fine, at least we know what the GUID value(s) are now. They don't exceed the limit though, but I'm certain something around that is causing this to overflow.
 

Tommy

Founder
Overflow so its making to many guids?

Depends really. I see some issues with your for loops again. You aren't incrementing the variable. :p

Line 55:

Code:
for (int i = 0; i < CA_TOWER_NUM; i)

Correct:

Code:
for (int i = 0; i < CA_TOWER_NUM; [COLOR=#00ff00]i++[/COLOR])

This goes for all the for loops in your source. Considering you're using the functions in SetupOutdoorPvP, that could be one issue.
 

brh11

Respected Member
Okay I will try and fix some up. I'm going to pull a noob question here lol. But what do the itr mean and what is incrementing the variable and what does it do?
 

Tommy

Founder
'itr' is a variable. Normally people name their iterator variable 'itr' because the variable name represents iterator or const_iterator. You can name it anything you want, just easy to identify it as 'itr'.

Increment is "++" (without quotations). That (++) is called an increment operator. It iterates through the elements inside of an array for example.

So, if I create an array:

Code:
uint32 myArray[] = { 30000, 40000, 50000 };

And then use it in a for loop:

Code:
for (int i = 0; i < 4; i++)
    TC_LOG_ERROR(LOG_FILTER_GENERAL, "%d", myArray[i]);

My output would be the elements inside of the array, like so:

30000
40000
50000

Without the increment operator (++) it will cause an overflow like you're having right now. You should also be aware of the Decrement operator (--) in other words "minus minus". Works about the same as the increment operator, but it reduces. You can also use the increment and decrement operators to run in reverse, like so:

Code:
for (int i = 0; i < 4; ++i)
    TC_LOG_ERROR(LOG_FILTER_GENERAL, "%d", myArray[i]);

Output should be:

50000
40000
30000

Hope this helps! I wrote everything from memory. :/
 

brh11

Respected Member
This is good.I fixed up the code and now the core will start up all the way :D.I get these errors though :( http://d.pr/i/eNaz.Is there something I missed ? Heres the code again http://pastebin.com/Rd8Whk7d.Its nice to finally get to this haha :D





Just found out.when I type anything in the console to even create an account nothing comes up.It didn't crash.And when I try to login in game it just sits at connected.weird 0_o
 
Last edited:
Status
Not open for further replies.
Top