• 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!

C++ Errors on commit in C++

Mjmackan

Mapper ~ Writer
Premium User
Joined
Jul 18, 2009
Messages
1,234
Solutions
8
Reaction score
111
Location
Sweden
Hello!

Distro: TFS 1.3(newest repo) trying to add new functions/commits by OTCv8.

Added these 4 commits in hope of getting wings, auras & shaders to work properly.
Well they do but other functions took damage as shown below in console errors.
No bugs when compiling however, but running a backup TFS version without the last three commits will not give any error at all.


1. OTCv8 detection, custom features packet, bigget packet size and bug f… · OTCv8/[email protected] (https://github.com/OTCv8/forgottenserver/commit/2839d4d7a8ad3597eff6c786f4ceb9b1b4b4456b)
2. Added early wings and aura support · OTCv8/[email protected] (https://github.com/OTCv8/forgottenserver/commit/866a98f13d17e36c33c3db107a65fc54c26203bf)
3. Early shaders supports, better aura & wings support · OTCv8/[email protected] (https://github.com/OTCv8/forgottenserver/commit/2f494dcbe742a09afd6a3e93e5abcea8c821f8fd)
4. Crash bug fix for outfit shaders · OTCv8/[email protected] (https://github.com/OTCv8/forgottenserver/commit/239f555b0f71cfe0e17b6e5012518b25696d2f76)

Lua:
Lua Script Error: [Scripts Interface]
C:\forgottenserver-master\vc14\x64\Release\data\scripts\eventcallbacks\player\default_onReportRuleViolation.lua
...er\vc14\x64\Release\data\scripts/lib\event_callbacks.lua:111: attempt to call global 'isScriptsInterface' (a nil value)
stack traceback:
        [C]: in function 'isScriptsInterface'
        ...er\vc14\x64\Release\data\scripts/lib\event_callbacks.lua:111: in function '__newindex'
        ...\eventcallbacks\player\default_onReportRuleViolation.lua:39: in main chunk
> default_onReportRuleViolation.lua [error]
^
Lua:
Lua Script Error: [GlobalEvent Interface]
data/globalevents/scripts/effects/textEffects.lua:onThink
data/lib/compat/compat.lua:668: attempt to call field 'sendAnimatedText' (a nil value)
stack traceback:
        [C]: in function 'sendAnimatedText'
        data/lib/compat/compat.lua:668: in function 'doSendAnimatedText'
        data/globalevents/scripts/effects/textEffects.lua:19: in function <data/globalevents/scripts/effects/textEffects.lua:1>
[Error - GlobalEvents::think] Failed to execute event: textEffects

Here's my "isScriptsInterface" in C.

luascript.h
C++:
        static int luaIsScriptsInterface(lua_State* L);
};

luascript.cpp
C++:
//isScriptsInterface()
    lua_register(luaState, "isScriptsInterface", LuaScriptInterface::luaIsScriptsInterface);

int LuaScriptInterface::luaIsScriptsInterface(lua_State* L)
{
    //isScriptsInterface()
    if (getScriptEnv()->getScriptInterface() == &g_scripts->getScriptInterface()) {
        pushBoolean(L, true);
    } else {
        reportErrorFunc(L, "EventCallback: can only be called inside (data/scripts/)");
        pushBoolean(L, false);
    }
    return 1;
}

Any ideas? 😁
 
Solution
Maybe you should try to re-compile all
Something might been happening while i compiled thats true, when i open my project file in visual studio now the debug/build dropdown has been exchanged with "attach" and I cant for the world change that.


Update on the matter, I changed directory and created a new folder with existing sources etc and I could compile again but got stuck at these errors:
C++:
Severity    Code    Description    Project    File    Line
Error    LNK2001    unresolved external symbol "public: __cdecl StoreInbox::StoreInbox(unsigned short)" ([email protected]@[email protected]@Z)    theforgottenserver    C:\otclient\forgottenserver-otclientv8\vc14\player.obj    1
Severity    Code    Description    Project    File    Line
Error...
OP
OP
Mjmackan

Mjmackan

Mapper ~ Writer
Premium User
Joined
Jul 18, 2009
Messages
1,234
Solutions
8
Reaction score
111
Location
Sweden
Maybe you should try to re-compile all
Something might been happening while i compiled thats true, when i open my project file in visual studio now the debug/build dropdown has been exchanged with "attach" and I cant for the world change that.


Update on the matter, I changed directory and created a new folder with existing sources etc and I could compile again but got stuck at these errors:
C++:
Severity    Code    Description    Project    File    Line
Error    LNK2001    unresolved external symbol "public: __cdecl StoreInbox::StoreInbox(unsigned short)" ([email protected]@[email protected]@Z)    theforgottenserver    C:\otclient\forgottenserver-otclientv8\vc14\player.obj    1
Severity    Code    Description    Project    File    Line
Error    LNK2001    unresolved external symbol "void __cdecl xtea::encrypt(unsigned char *,unsigned __int64,class std::array<unsigned int,64> const &)" ([email protected]@@[email protected][email protected]@[email protected]@@Z)    theforgottenserver    C:\otclient\forgottenserver-otclientv8\vc14\protocol.obj    1
Severity    Code    Description    Project    File    Line
Error    LNK2001    unresolved external symbol "void __cdecl xtea::decrypt(unsigned char *,unsigned __int64,class std::array<unsigned int,64> const &)" ([email protected]@@[email protected][email protected]@[email protected]@@Z)    theforgottenserver    C:\otclient\forgottenserver-otclientv8\vc14\protocol.obj    1
Severity    Code    Description    Project    File    Line
Error    LNK2001    unresolved external symbol "class std::array<unsigned int,64> __cdecl xtea::expand_key(class std::array<unsigned int,4> const &)" ([email protected]@@[email protected][email protected]@[email protected]@[email protected][email protected]@@Z)    theforgottenserver    C:\otclient\forgottenserver-otclientv8\vc14\protocolgame.obj    1
Severity    Code    Description    Project    File    Line
Error    LNK1120    4 unresolved externals    theforgottenserver    C:\otclient\forgottenserver-otclientv8\vc14\x64\Release\theforgottenserver-x64.exe    1

I have no clue where to look, it doesn't adress the correct file or line of fault?



Edit: Solved, had to right click on solutions explorer then reload project. Now everything works as intended.
 
Last edited:
Solution
Top