Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

Recommended Posts

Today, I’d like to address a specific bug related to the /war command in the game. The issue arises when you input /war -41212551 GuildName (with a negative number), which causes the server to crash. By implementing a simple fix, you’ll be able to use all war fields without any crashes!

Fixing the Bug

Follow these steps to address the bug in your code:

1. Locate the File

Navigate to the following directory in your server files:

 
This is the hidden content, please

2. Modify the Code

Open the cmd_general.cpp file and search for the function that contains the following line:

 
This is the hidden content, please

You will need to replace this line with:

 
This is the hidden content, please

Explanation of the Fix

The issue stems from the type of variable being used. Originally, int was applied for the type, which can lead to undefined behavior when handling negative numbers. By changing it to DWORD, you ensure that the value remains non-negative, thus preventing the server from crashing.

 

After executing this modification, the /war command should function correctly without causing any disruption to gameplay. This fix not only enhances server stability but also improves user experience.

Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

spacer.png

Disable AdBlock
The popup will be closed in 5 seconds...