Issue information

Issue ID
#7362
Status
Fixed
Severity
None
Started
bgamez23
Jun 14, 2013 7:37
Last Post
malufett
Jun 14, 2013 9:00
Confirmation
N/A

bgamez23 - Jun 14, 2013 7:37

Warning 1 warning C4244: '=' : conversion from 'short' to 'defType', possible loss of data \hercules\src\map\battle.c 1189 1 map-server
Warning 2 warning C4244: '=' : conversion from 'short' to 'defType', possible loss of data \hercules\src\map\battle.c 1296 1 map-server
Warning 3 warning C4013: 'add_timer' undefined; assuming extern returning int \hercules\src\map\npc.c 279 1 map-server
Warning 4 warning C4013: 'gettick' undefined; assuming extern returning int \hercules\src\map\npc.c 279 1 map-server
Warning 5 warning C4013: 'delete_timer' undefined; assuming extern returning int \hercules\src\map\script.c 3354 1 map-server
Warning 6 warning C4013: 'add_timer' undefined; assuming extern returning int \hercules\src\map\script.c 3395 1 map-server
Warning 7 warning C4013: 'gettick' undefined; assuming extern returning int \hercules\src\map\script.c 3395 1 map-server
Error 8 error LNK2019: unresolved external symbol _add_timer referenced in function _npc_rr_secure_timeout_timer \Hercules\vcproj-12\npc.obj map-server
Error 9 error LNK2001: unresolved external symbol _add_timer \Hercules\vcproj-12\script.obj map-server
Error 10 error LNK2019: unresolved external symbol _gettick referenced in function _npc_rr_secure_timeout_timer \Hercules\vcproj-12\npc.obj map-server
Error 11 error LNK2001: unresolved external symbol _gettick \Hercules\vcproj-12\script.obj map-server
Error 12 error LNK2019: unresolved external symbol _delete_timer referenced in function _script_detach_state \Hercules\vcproj-12\script.obj map-server
Error 13 error LNK1120: 3 unresolved externals \Hercules\map-server.exe map-server

This post has been edited by bgamez23 on Jun 14, 2013 7:38

malufett - Jun 14, 2013 8:10

I can't reproduce this in MVC10...did you update it manually?

:meow:

kyeme - Jun 14, 2013 8:16

[quote name="malufett" timestamp="1371197446"]
I can't reproduce this in MVC10...did you update it manually?

:meow:[/quote]
Im using Hercules-9 , windows PRE-RENEWAL and ive got this:

[code=auto:0] 2>c:\documents and settings\ody\desktop\hercules\src\map\battle.c(1189) : warning C4244: '=' : conversion from 'short' to 'defType', possible loss of data 2>c:\documents and settings\ody\desktop\hercules\src\map\battle.c(1296) : warning C4244: '=' : conversion from 'short' to 'defType', possible loss of data [/code]

Ind - Jun 14, 2013 8:18

the add_timer (and other timer errors) are not in the latest hercules[quote name="kyeme" timestamp="1371197778"]

[quote name="malufett" timestamp="1371197446"]
I can't reproduce this in MVC10...did you update it manually?

:meow:[/quote]Im using Hercules-9 , windows PRE-RENEWAL and ive got this:[code=auto:0]2>c:\documents and settings\ody\desktop\hercules\src\map\battle.c(1189) : warning C4244: '=' : conversion from 'short' to 'defType', possible loss of data 2>c:\documents and settings\ody\desktop\hercules\src\map\battle.c(1296) : warning C4244: '=' : conversion from 'short' to 'defType', possible loss of data [/code]

[/quote]this is however, its because of the following e.g.[code=auto:0] defType def1 = status_get_def(target); //Don't use tstatus->def1 due to skill timer reductions. short def2 = tstatus->def2, vit_def; def1 = status_calc_def2(target, tsc, def1, false); // equip def(RE) def2 = status_calc_def(target, tsc, def2, false); // status def(RE) [/code]status_calc_def returns defType, in pre-re defType is 'char', but in renewal its 'short', status_calc_def2 returns short so this warning comes up in pre-re (not sure whats the best way to fix this)

bgamez23 - Jun 14, 2013 8:23

[quote name="malufett" timestamp="1371197446"]
I can't reproduce this in MVC10...did you update it manually?

:meow:[/quote]

just enable SECURE_NPCTIMEOUT

bgamez23 - Jun 14, 2013 8:26

[quote name="kyeme" timestamp="1371197778"][quote name="malufett" timestamp="1371197446"]

I can't reproduce this in MVC10...did you update it manually?

:meow:[/quote]Im using Hercules-9 , windows PRE-RENEWAL and ive got this:

[code=auto:0] 2>c:\documents and settings\ody\desktop\hercules\src\map\battle.c(1189) : warning C4244: '=' : conversion from 'short' to 'defType', possible loss of data 2>c:\documents and settings\ody\desktop\hercules\src\map\battle.c(1296) : warning C4244: '=' : conversion from 'short' to 'defType', possible loss of data [/code][/quote]

same warning for me. using pre-re

[url="http://herc.ws/board/tracker/issue-7363-srcmapbattlec1189-warning-c4244/"]http://herc.ws/board/tracker/issue-7363-srcmapbattlec1189-warning-c4244/[/url]

malufett - Jun 14, 2013 8:27

[quote]
status_calc_def returns defType, in pre-re defType is 'char', but in renewal its 'short', status_calc_def2 returns short so this warning comes up in pre-re (not sure whats the best way to fix this)[/quote]
hmmm...what about like this
[code=auto:0] #ifdef RENEWAL def1 = status_calc_def2(target, tsc, def1, false); def2 = status_calc_def(target, tsc, def2, false); #else def1 = status_calc_def(target, tsc, def1, false); def2 = status_calc_def2(target, tsc, def2, false); #endif [/code]

:meow:

malufett - Jun 14, 2013 9:00

Fixed @ d663d4d86a2a403764baa0de27af6f9950d9a09f
:meow: