[Help] Problem with Protocol.cpp Source code

TheOxygen

New Member
Joined
Feb 4, 2024
Messages
1
Reaction score
0
hey guys!
like the title - I have problem with protocol.cpp
I build Event Guess the number
Guess.cpp - without errors
Guess.h - without errors
but when i wrote that code on Protocol.cpp

void CGStartEventProtocol(int aIndex, BYTE protoNum, char* aRecv)
{


LPOBJ lpObj = &gObj[aIndex];

switch ( protoNum )
{
case 0x00:
{
tempindex = aIndex;

CGChatRecv((PMSG_CHAT_RECV *)aRecv, aIndex);

gGMCommand.ReadInfo(aIndex,(LPBYTE)aRecv);

if(atoi((char*)aRecv+13) == Guess.GetNumber())
Guess.Winner(aIndex);
else if(atoi((char*)aRecv+13) == 0 || atoi((char*)aRecv+13) > 50)
{
gNotice.GCNoticeSendToAll(0,"You can only guess a number between 1 and 50",aIndex,1);
}
else
{
char msg[60];
sprintf(msg,"%s guessed the number '%d' and was wrong",lpObj->Name,atoi((char*)aRecv+13));
gNotice.GCNoticeSendToAll(0,msg);
}
}
break;
}
}


thahs gives earror :

1>Protocol.obj : error LNK2019: unresolved external symbol "public: void __thiscall CGMCommand::ReadInfo(int,unsigned char *)" (?ReadInfo@CGMCommand@@QAEXHPAE@Z) referenced in function "void __cdecl CGStartEventProtocol(int,unsigned char,char *)" (?CGStartEventProtocol@@YAXHEPAD@Z)
now im trying everything maybe one mounth and half to fix that
also i understand that void CGStartEventProtocol not work with int , char , char*
I would appreciate your help because I no longer understand what to do
Source files season 97d by kayito
Big thanks to everyone
Have a nice day :D