• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Compiling tfs 1.3 with Delusion abilities

Ovnyx

Member
Joined
Jul 25, 2017
Messages
163
Solutions
2
Reaction score
7
hi, i was modifying tfs 1.3 the last one TFS 1.3, i got some errors while compiling, i fix most of them but i cant figure out this ones:
1567104604832.png

where are this identifiers declared? i look at the enums and they are there, and i did all the change in order acording to THIS
thanks in advice! :D
 
hi, i was modifying tfs 1.3 the last one TFS 1.3, i got some errors while compiling, i fix most of them but i cant figure out this ones:
View attachment 38663

where are this identifiers declared? i look at the enums and they are there, and i did all the change in order acording to THIS
thanks in advice! :D
Boosts name changes and 2 new functions (#2485) · otland/forgottenserver@c7bef15 (https://github.com/otland/forgottenserver/commit/c7bef1519a5040eb82d4923005602b0e026f7d96#diff-66217ab5c054d1ce40c5940ec02eb541)
 
ok i fixed but there is another problem:
Code:
1>------ Build started: Project: theforgottenserver, Configuration: Release x64 ------
1>tools.cpp
1>c:\users\legion\desktop\forgottenserver-master\src\tools.cpp(1029): error C2065: 'SPECIALSKILL_HITPOINTSLEECHCHANCE': undeclared identifier
1>c:\users\legion\desktop\forgottenserver-master\src\tools.cpp(1031): error C2065: 'SPECIALSKILL_HITPOINTSLEECHAMOUNT': undeclared identifier
1>c:\users\legion\desktop\forgottenserver-master\src\tools.cpp(1033): error C2065: 'SPECIALSKILL_MANAPOINTSLEECHCHANCE': undeclared identifier
1>c:\users\legion\desktop\forgottenserver-master\src\tools.cpp(1035): error C2065: 'SPECIALSKILL_MANAPOINTSLEECHAMOUNT': undeclared identifier
1>c:\users\legion\desktop\forgottenserver-master\src\tools.cpp(1029): error C2051: case expression not constant
1>c:\users\legion\desktop\forgottenserver-master\src\tools.cpp(1031): error C2051: case expression not constant
1>c:\users\legion\desktop\forgottenserver-master\src\tools.cpp(1033): error C2051: case expression not constant
1>c:\users\legion\desktop\forgottenserver-master\src\tools.cpp(1035): error C2051: case expression not constant
1>Done building project "theforgottenserver.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

the thing is that if i replace in tools.cpp in 1029:
Code:
itemAbilityTypes specialSkillToAbility(uint8_t skillid)
{
    switch (skillid) {
        case SPECIALSKILL_CRITICALHITCHANCE:
            return ITEM_ABILITY_CRITICALHITCHANCE;
        case SPECIALSKILL_CRITICALHITAMOUNT:
            return ITEM_ABILITY_CRITICALHITAMOUNT;
        case SPECIALSKILL_HITPOINTSLEECHCHANCE:
            return ITEM_ABILITY_LIFELEECHCHANCE;
        case SPECIALSKILL_HITPOINTSLEECHAMOUNT:
            return ITEM_ABILITY_LIFELEECHAMOUNT;
        case SPECIALSKILL_MANAPOINTSLEECHCHANCE:
            return ITEM_ABILITY_MANALEECHCHANCE;
        case SPECIALSKILL_MANAPOINTSLEECHAMOUNT:
            return ITEM_ABILITY_MANALEECHAMOUNT;
        default:
            return ITEM_ABILITY_NONE;
    }
}

if i replace
SPECIALSKILL_HITPOINTSLEECHCHANCE
for
SPECIALSKILL_LIFELEECHCHANCE

like this:
Code:
itemAbilityTypes specialSkillToAbility(uint8_t skillid)
{
    switch (skillid) {
        case SPECIALSKILL_CRITICALHITCHANCE:
            return ITEM_ABILITY_CRITICALHITCHANCE;
        case SPECIALSKILL_CRITICALHITAMOUNT:
            return ITEM_ABILITY_CRITICALHITAMOUNT;
        case SPECIALSKILL_LIFELEECHCHANCE:
            return ITEM_ABILITY_LIFELEECHCHANCE;
        case ITEM_ABILITY_LIFELEECHAMOUNT:
            return ITEM_ABILITY_LIFELEECHAMOUNT;
        case ITEM_ABILITY_MANALEECHCHANCE:
            return ITEM_ABILITY_MANALEECHCHANCE;
        case ITEM_ABILITY_MANALEECHAMOUNT:
            return ITEM_ABILITY_MANALEECHAMOUNT;
        default:
            return ITEM_ABILITY_NONE;
    }
}

i got this error:

Code:
1>------ Build started: Project: theforgottenserver, Configuration: Release x64 ------
1>tools.cpp
1>condition.obj : error LNK2001: unresolved external symbol "public: void __cdecl Player::setVarStats(enum stats_t,int)" (?setVarStats@Player@@QEAAXW4stats_t@@H@Z)
1>C:\Users\LEGION\Desktop\forgottenserver-master\vc14\x64\Release\theforgottenserver-x64.exe : fatal error LNK1120: 1 unresolved externals
1>Done building project "theforgottenserver.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

EDIT:
like this fix the problem of the undeclared identifier
1567112026657.png
But still having this error:
Code:
1>------ Build started: Project: theforgottenserver, Configuration: Release x64 ------
1>tools.cpp
1>condition.obj : error LNK2001: unresolved external symbol "public: void __cdecl Player::setVarStats(enum stats_t,int)" (?setVarStats@Player@@QEAAXW4stats_t@@H@Z)
1>C:\Users\LEGION\Desktop\forgottenserver-master\vc14\x64\Release\theforgottenserver-x64.exe : fatal error LNK1120: 1 unresolved externals
1>Done building project "theforgottenserver.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
Last edited:
No, setVarStats not setVarStatsPercent.
ye i was just editingthe post D; i taked from the repo and put it on my player.cpp and it finally compile succeeded, going to test it thank you very much

EDIT: Yes it worked perfectly, gonna continue with your other part of abilities 👍

trying to figure out why
Code:
1>combat.obj : error LNK2001: unresolved external symbol "public: __int64 __cdecl Player::getEffectiveAbility(enum itemAbilityTypes)const " (?getEffectiveAbility@Player@@QEBA_JW4itemAbilityTypes@@@Z)
asking for getEffectiveAbility with enum as parameter since the repo says it is itemAbilityTypes, also in player.h is defined the same? cant find any definitio of that with enum param
Code:
int64_t Player::getEffectiveAbility(itemAbilityTypes abilityType) const

EDIT2: i guess i fixed that one but this one
Code:
'C:\Windows\SysWOW64\WindowsPowerShell\v1.0\x64\Release\vcpkg.applocal.log'.
1>En C:\Users\LEGION\Desktop\vcpkg\scripts\buildsystems\msbuild\applocal.ps1: 12 Carácter: 5
1>+     Set-Content -Path $copiedFilesLog -Value "" -Encoding UTF8
1>+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1>    + CategoryInfo          : ObjectNotFound: (C:\Windows\SysW...kg.applocal.log:String) [Set-Content], DirectoryNotFo
1>   undException
1>    + FullyQualifiedErrorId : GetContentWriterDirectoryNotFoundError,Microsoft.PowerShell.Commands.SetContentCommand
1>

tryied whole day but cant find whats the problem
 
Last edited:
Back
Top