Jump to content
  • 0

Compile warnings after updating to hash d20a7cafc0c32c0d6e2ad67e58f9ba45110d7ac7


Technoken

Question


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   126
  • Joined:  04/04/16
  • Last Seen:  

I'm having this compilation warning after updating my git hash from 4e137d3047a9f9d5327212787c9d61a9c811a46c to d20a7cafc0c32c0d6e2ad67e58f9ba45110d7ac7

3>..\src\char\char_mapif.c(1041): warning C4305: 'initializing' : truncation from 'unsigned int' to 'uint16'
3>..\src\char\char_mapif.c(1070): warning C4305: 'initializing' : truncation from 'unsigned int' to 'uint16'
1>  chrif.c
3>  int_mercenary.c
3>  int_party.c
3>  int_pet.c
3>  int_quest.c
3>  int_storage.c
3>  inter.c
1>  clif.c
1>  date.c
1>..\src\map\chrif.c(312): warning C4305: '=' : truncation from 'unsigned int' to 'uint16'

I don't have any src edits in these files(char_mapif.c & chrif.c)

 

It's pointing out to these lines

\src\char\char_mapif.c(1041)

\src\char\char_mapif.c(1070)

\src\map\chrif.c(312)

 

I have no idea what actually causes the warning. Can anyone help me?

 

Thanks!

 

EDIT:

After I started my server this error appears

[Error]: mmo_charstatus size = 75472 is too big to be transmitted. (must be belo
w 0xFFFF)
Edited by Technoken
Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   126
  • Joined:  04/04/16
  • Last Seen:  

If you don't want to change the packets, you'll have to make the size of mmo_charstatus to less then 65535 bytes.

 

Currently it's 75472, so you need to shave off about 10000 bytes.

The size of struct s_skill is 8 bytes.

10000/8 is 1250

So lower the MAX_SKILL by at least 1250.

I was thinking why was this warning occurred after I updated. It wasn't there before. I tried to use 1200 on max_skill. Hoping that the mod will still work after this. lol was just about to test it.

 

EDIT/UPDATE:

I solved it by using MAX_SKILL 1200 in mmo.h and it's working fine now.

 

Thanks for those who helped!  /no1

Edited by Technoken
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  99
  • Topics Per Day:  0.02
  • Content Count:  623
  • Reputation:   94
  • Joined:  05/11/12
  • Last Seen:  

I'm having this compilation warning after updating my git hash from 4e137d3047a9f9d5327212787c9d61a9c811a46c to d20a7cafc0c32c0d6e2ad67e58f9ba45110d7ac7

3>..\src\char\char_mapif.c(1041): warning C4305: 'initializing' : truncation from 'unsigned int' to 'uint16'
3>..\src\char\char_mapif.c(1070): warning C4305: 'initializing' : truncation from 'unsigned int' to 'uint16'
1>  chrif.c
3>  int_mercenary.c
3>  int_party.c
3>  int_pet.c
3>  int_quest.c
3>  int_storage.c
3>  inter.c
1>  clif.c
1>  date.c
1>..\src\map\chrif.c(312): warning C4305: '=' : truncation from 'unsigned int' to 'uint16'

I don't have any src edits in these files(char_mapif.c & chrif.c)

 

It's pointing out to these lines

\src\char\char_mapif.c(1041)

\src\char\char_mapif.c(1070)

\src\map\chrif.c(312)

 

I have no idea what actually causes the warning. Can anyone help me?

 

Thanks!

 

I am also having the same problem.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   126
  • Joined:  04/04/16
  • Last Seen:  

BUMP! HELP PLEASE! I can't start my server because of this.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  99
  • Topics Per Day:  0.02
  • Content Count:  623
  • Reputation:   94
  • Joined:  05/11/12
  • Last Seen:  

Who can help is @Secrets

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   431
  • Joined:  01/26/16
  • Last Seen:  

Did you make any change to MAX_INVENTORY or MAX_STORAGE?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  99
  • Topics Per Day:  0.02
  • Content Count:  623
  • Reputation:   94
  • Joined:  05/11/12
  • Last Seen:  

Did you make any change to MAX_INVENTORY or MAX_STORAGE?

 

 

Nop:

#define MAX_INVENTORY 100 ///Maximum items in player inventory
#define MAX_STORAGE 600 ///Max number of storage slots a player can have, (up to ~850 tested)
#define MAX_GUILD_STORAGE 600 ///Max number of storage slots a guild
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  5
  • Reputation:   0
  • Joined:  08/15/16
  • Last Seen:  

I have the same problem. i want to increase the MAX_STORAGE, MAX_INVENTORY and MAX_CART. plz help us.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   126
  • Joined:  04/04/16
  • Last Seen:  

Found out what's causing the problem with me. Because of the mod I applied OnPCUseSkillEvent. It modifies MAX_SKILL from 1200 to 4000 in mmo.h.

I'm still trying to figure out how to fix it.

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  141
  • Reputation:   45
  • Joined:  08/14/12
  • Last Seen:  

If you don't want to change the packets, you'll have to make the size of mmo_charstatus to less then 65510 bytes.

 

Currently it's 75472, so you need to shave off about 10000 bytes.

The size of struct s_skill is 8 bytes.

10000/8 is 1250

So lower the MAX_SKILL by at least 1250.

Edited by Nitrous
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  99
  • Topics Per Day:  0.02
  • Content Count:  623
  • Reputation:   94
  • Joined:  05/11/12
  • Last Seen:  

If you don't want to change the packets, you'll have to make the size of mmo_charstatus to less then 65510 bytes.

 

Currently it's 75472, so you need to shave off about 10000 bytes.

The size of struct s_skill is 8 bytes.

10000/8 is 1250

So lower the MAX_SKILL by at least 1250.

 

 

But I do not modified it in my emulator ...

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   126
  • Joined:  04/04/16
  • Last Seen:  

But I do not modified it in my emulator ...

 

Maybe you modified something in your mmo.h? try to look for the changes you made in mmo.h

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  99
  • Topics Per Day:  0.02
  • Content Count:  623
  • Reputation:   94
  • Joined:  05/11/12
  • Last Seen:  

 

But I do not modified it in my emulator ...

 

Maybe you modified something in your mmo.h? try to look for the changes you made in mmo.h

 

 

only that.

#define DEFAULT_WALK_SPEED 120 ///Default walk speed is 150
#define MAX_CHARS 18 /// Default is 9
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  5
  • Reputation:   0
  • Joined:  08/15/16
  • Last Seen:  

'How I make to increase the MAX_STORAGE of 600 to 2000, MAX_INVENTORY OF 100 to 300 and MAX_CART of 100 to 500. I can't compile this. can you help me?

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  141
  • Reputation:   45
  • Joined:  08/14/12
  • Last Seen:  

You can either revert the Random Option commits, rewrite the packets between char and map, or lower your limits.

 

I've started working on a fix, but until then, just revert the Random Option commits.

https://rathena.org/board/topic/107116-packet-size-increase-for-mmo-charstatus/

Edited by Nitrous
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  5
  • Reputation:   0
  • Joined:  08/15/16
  • Last Seen:  

Could you upload your files of the scr folder to overwrite on my server and test if going working good? Thanks for you help ^^

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
Answer this question...

×   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...