• 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] wierd world.exe issue

Status
Not open for further replies.

cliffsmits

Enthusiast
i have a compiled server and evreything works smooth without any issue.

now i have changed some names in the teleporter in c++ and some text files and i have recompiled the core again,


when i try to login for the first time when the world.exe is replaced evreything works fine when you log out and try to login again it just dc 2/3 times before you can play again.

and now when youre just logout and relogin again it just dc 1-5 times and than your able to play again ?.


Login script add text welcome back online
11ljwb7.png


Telenpc main menu edit to endlesswow arenas
2uppajc.png


Disabled Hiden Village
2mds0gl.png


Compile
14bkz2x.png


After those edits it dc me ingame after logout
 
Last edited:

Tommy

Founder
Can you give us screenshots of this? Do any of your custom scripts cause this? Preferably "OnLogin/Logout" custom scripts (if you have those hooks in a custom script). No errors in your Server.log or Auth.log? What is your current commit hash that you updated to (to be more specific, which commit/rev did you update to?) Did you restart your authserver.exe and then tried to see if this happens? Are you sure nothing is blocking your connection?
 

cliffsmits

Enthusiast
Can you give us screenshots of this? Do any of your custom scripts cause this? Preferably "OnLogin/Logout" custom scripts (if you have those hooks in a custom script). No errors in your Server.log or Auth.log? What is your current commit hash that you updated to (to be more specific, which commit/rev did you update to?) Did you restart your authserver.exe and then tried to see if this happens? Are you sure nothing is blocking your connection?

Tommy thank you for your reply.
i am currently on my work till 17.00

i will make a video tonight upload it to youtube and post the link here .

in the video i will show the problem and the compile status etc.

regards cliffsmits


i have a compiled server and evreything works smooth without any issue.

now i have changed some names in the teleporter in c++ and some text files and i have recompiled the core again,


when i try to login for the first time when the world.exe is replaced evreything works fine when you log out and try to login again it just dc 2/3 times before you can play again.

and now when youre just logout and relogin again it just dc 1-5 times and than your able to play again ?.


Login script add text welcome back online
11ljwb7.png


Telenpc main menu edit to endlesswow arenas
2uppajc.png


Disabled Hiden Village
2mds0gl.png


After those edits it dc me ingame after logout
 
Last edited:

Tommy

Founder
"player->GetName()" needs to call constant char, like so:

Code:
player->GetName().c_str();

Is that the full "OnLogin" code? Regardless, do the fix above.
 

Kaev

Super Moderator
Give us the complete line which starts with "ChatHandler(Player->GetSession())...", please.
And before resurrecting a player, you should check if he's dead or not.
 

cliffsmits

Enthusiast
Give us the complete line which starts with "ChatHandler(Player->GetSession())...", please.
And before resurrecting a player, you should check if he's dead or not.

here you go the whole script

Code:
include "ScriptPCH.h"

#define SONG 11466

class on_login : public PlayerScript
{
    public:
        on_login() : PlayerScript("on_login") {}

    void OnLogin(Player* player)
    {
            ChatHandler(player->GetSession()).PSendSysMessage("Welcome back online! Your character has been saved to the database, buffed and healed! Now remember to vote every 12 hours on www.endlesswow.net!");
	     player->GetSession()->SendNotification("WELCOME BACK ONLINE ");
	     player->GetSession()->SendNotification("! %s !", player->GetName());

	     player->SetXpRate(1);	     

	     if (player->GetMap()->IsBattlegroundOrArena())
	     {
	     	  player->ResurrectPlayer(0.5f);
	         player->TeleportTo(534, 5541.770020f, -3783.469971f, 1594.910034f, 2.883010f);
	     }

	     /*QueryResult result = CharacterDatabase.PQuery("SELECT first_login FROM characters WHERE guid = '%u'", player->GetGUID());
 
	     Field* fields = result->Fetch();
	     uint8 flag = fields[0].GetUInt8();

            if (player->HasFlag)
            {
		  player->CastSpell(player, 11543, 1);
		  player->PlayDirectSound(11466, player);
		  CharacterDatabase.PExecute("UPDATE characters set first_login = 1 WHERE guid = '%u'", player->GetGUID());
            }*/
    }
};

void AddSC_on_login()
{
    new on_login();
 

cliffsmits

Enthusiast
oke i tried to recompile the orginal source with the same scripts when it worked before but just after the recompile than will the issue comes up with dc me out of the game somone know to fix thise strange solution ?

If somone can help me to fix this issue so that no players get dc in the login stage i will pay between 5 - 20 $
 
Last edited:

Tommy

Founder
i replaced the text what you said now its says

Error 1 error C2228: left of '.c_str' must have class/struct/union

2d6tms2.png

You didn't look at my code. :p

You need open/close parenthesis next to GetName():

Code:
player->GetName[COLOR="#00FF00"]()[/COLOR].c_str();

here you go the whole script

Code:
include "ScriptPCH.h"

#define SONG 11466

class on_login : public PlayerScript
{
    public:
        on_login() : PlayerScript("on_login") {}

    void OnLogin(Player* player)
    {
            ChatHandler(player->GetSession()).PSendSysMessage("Welcome back online! Your character has been saved to the database, buffed and healed! Now remember to vote every 12 hours on www.endlesswow.net!");
	     player->GetSession()->SendNotification("WELCOME BACK ONLINE ");
	     player->GetSession()->SendNotification("! %s !", player->GetName());

	     player->SetXpRate(1);	     

	     if (player->GetMap()->IsBattlegroundOrArena())
	     {
	     	  player->ResurrectPlayer(0.5f);
	         player->TeleportTo(534, 5541.770020f, -3783.469971f, 1594.910034f, 2.883010f);
	     }

	     /*QueryResult result = CharacterDatabase.PQuery("SELECT first_login FROM characters WHERE guid = '%u'", player->GetGUID());
 
	     Field* fields = result->Fetch();
	     uint8 flag = fields[0].GetUInt8();

            if (player->HasFlag)
            {
		  player->CastSpell(player, 11543, 1);
		  player->PlayDirectSound(11466, player);
		  CharacterDatabase.PExecute("UPDATE characters set first_login = 1 WHERE guid = '%u'", player->GetGUID());
            }*/
    }
};

void AddSC_on_login()
{
    new on_login();
}

How old is your source? I'm asking because the updated "OnLogin" hook has a parameter "bool firstLogin" to check if it's the player's first login. Overall, if you have an older source you don't need to check the database for the player's "first login", you can check their flags.

Not related to your issue:

I removed your define directive since it wasn't being used
I removed the ScriptPCH.h include since you don't need it (unless your source is a few years old+ longer)
"PSendSysMessage" requires arguments (doesn't necessarily require them but it expects it) ~ I changed it to "SendSysMessage"
Added "c_str()" so player->GetName() will send a const char* instead of a const string
Lastly I added a check to see if the player is dead and in a battleground/arena map to see if the player should be revived

Output:

Code:
class on_login : public PlayerScript
{
public:
    on_login() : PlayerScript("on_login") { }

    void OnLogin(Player* player)
    {
        ChatHandler(player->GetSession()).SendSysMessage("Welcome back online! Your character has been saved to the database, buffed and healed! Now remember to vote every 12 hours on www.endlesswow.net!");
        player->GetSession()->SendNotification("WELCOME BACK ONLINE ");
        player->GetSession()->SendNotification("! %s !", player->GetName().c_str());

        player->SetXpRate(1);	     

        if (!player->IsAlive && player->GetMap()->IsBattlegroundOrArena())
        {
            player->ResurrectPlayer(0.5f);
            player->TeleportTo(534, 5541.770020f, -3783.469971f, 1594.910034f, 2.883010f);
        }

	     /*QueryResult result = CharacterDatabase.PQuery("SELECT first_login FROM characters WHERE guid = '%u'", player->GetGUID());
 
	     Field* fields = result->Fetch();
	     uint8 flag = fields[0].GetUInt8();

            if (player->HasFlag)
            {
		  player->CastSpell(player, 11543, 1);
		  player->PlayDirectSound(11466, player);
		  CharacterDatabase.PExecute("UPDATE characters set first_login = 1 WHERE guid = '%u'", player->GetGUID());
            }*/
    }
};

void AddSC_on_login()
{
    new on_login();
}

If your disconnection problems are still happening, it must be another custom script causing it, it's on your side or it's a core issue.
 

cliffsmits

Enthusiast
think its a core issue i tried this aswell still the situation close the thread i will do it on a another way to solve this.


thankyou for all help that you guys gave me
 
Status
Not open for further replies.
Top