Code: Show/Hide printf("%i - (INVALID)(%i)(%i)(%i)(%i)(%i)(%i)(%i)(%i)\n", Packet->Source->ScoreID,
GetShort(Packet->Message, 5), GetShort(Packet->Message, 9), GetShort(Packet->Message, 13), GetShort(Packet->Message, 17), GetShort(Packet->Message, 5), GetShort(Packet->Message, 9), GetShort(Packet->Message, 13), GetShort(Packet->Message, 17)); |
Code: Show/Hide printf("%i - (INVALID)(%i)(%i)(%i)(%i)(%i)(%i)(%i)(%i)\n", Packet->Source->ScoreID,
GetShort(Packet->Message, 5), GetShort(Packet->Message, 9), GetShort(Packet->Message, 13), GetShort(Packet->Message, 17), GetShort(Packet->Message, 5), GetShort(Packet->Message, 9), GetShort(Packet->Message, 13), GetShort(Packet->Message, 17)); |
Code: Show/Hide printf("%i - (INVALID)(1)(2)(3)(4)(5)(6)(7)(8)\n", Packet->Source->ScoreID,
1, 2, 3, 4, 5, 6, 7, 8)); |
Code: Show/Hide GetShort(Packet->Message, 5),
GetShort(Packet->Message, 9), GetShort(Packet->Message, 13), GetShort(Packet->Message, 17), GetShort(Packet->Message, 5), GetShort(Packet->Message, 9), GetShort(Packet->Message, 13), GetShort(Packet->Message, 17)); |
Code: Show/Hide char packet[3]; |
Code: Show/Hide short GetShort(char *buffer, int offset)
{ return *(short*)(buffer + offset); } |
Code: Show/Hide short GetShort(char *buffer, int offset)
{ //get the point in the array that contains the value we're looking for char *location = buffer + offset; //since we want to return a short, type-cast it to a short* instead of a char* short *sLocation = (short*)location; //now dereference the pointer (load the value of the memory it points to) short ret = *sLocation; //now return this value return ret; } |
Code: Show/Hide /* 0x04 */
struct pkt_PlayerLeaving { char type; short ident; }; |
Code: Show/Hide void __stdcall handlePlayerLeaving(Host *h, char *msg, Uint32 len)
{ struct pkt_PlayerLeaving *pkt = (pkt_PlayerLeaving *)msg; Player *p; CHECK(len != sizeof(pkt_PlayerLeaving)); if (p = h->getPlayer(pkt->ident)) // and so on... |
Code: Show/Hide ------ Build started: Project: SubBill3, Configuration: Debug Win32 ------
Compiling... main.cpp c:\continuum server\server\subbill3\linkedlist.h(381) : warning C4267: '=' : conversion from 'size_t' to 'LONG', possible loss of data c:\continuum server\server\subbill3\linkedlist.h(425) : warning C4267: '=' : conversion from 'size_t' to 'LONG', possible loss of data c:\continuum server\server\subbill3\linkedlist.h(433) : warning C4996: 'itoa' was declared deprecated c:\program files\microsoft visual studio 8\vc\include\stdlib.h(820) : see declaration of 'itoa' Message: 'The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _itoa. See online help for details.' c:\continuum server\server\subbill3\linkedlist.h(437) : warning C4267: '=' : conversion from 'size_t' to 'LONG', possible loss of data c:\continuum server\server\subbill3\linkedlist.h(444) : warning C4996: 'itoa' was declared deprecated c:\program files\microsoft visual studio 8\vc\include\stdlib.h(820) : see declaration of 'itoa' Message: 'The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _itoa. See online help for details.' c:\continuum server\server\subbill3\linkedlist.h(448) : warning C4267: '=' : conversion from 'size_t' to 'LONG', possible loss of data c:\continuum server\server\subbill3\linkedlist.h(478) : warning C4267: '+=' : conversion from 'size_t' to 'LONG', possible loss of data c:\continuum server\server\subbill3\linkedlist.h(485) : warning C4996: 'itoa' was declared deprecated c:\program files\microsoft visual studio 8\vc\include\stdlib.h(820) : see declaration of 'itoa' Message: 'The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _itoa. See online help for details.' c:\continuum server\server\subbill3\linkedlist.h(496) : warning C4267: '+=' : conversion from 'size_t' to 'LONG', possible loss of data c:\continuum server\server\subbill3\linkedlist.h(502) : warning C4996: 'itoa' was declared deprecated c:\program files\microsoft visual studio 8\vc\include\stdlib.h(820) : see declaration of 'itoa' Message: 'The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _itoa. See online help for details.' c:\continuum server\server\subbill3\linkedlist.h(513) : warning C4267: '+=' : conversion from 'size_t' to 'LONG', possible loss of data c:\continuum server\server\subbill3\linkedlist.h(533) : warning C4267: '=' : conversion from 'size_t' to 'LONG', possible loss of data c:\continuum server\server\subbill3\linkedlist.h(543) : warning C4996: 'itoa' was declared deprecated c:\program files\microsoft visual studio 8\vc\include\stdlib.h(820) : see declaration of 'itoa' Message: 'The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _itoa. See online help for details.' c:\continuum server\server\subbill3\linkedlist.h(547) : warning C4267: '=' : conversion from 'size_t' to 'LONG', possible loss of data c:\continuum server\server\subbill3\linkedlist.h(557) : warning C4996: 'itoa' was declared deprecated c:\program files\microsoft visual studio 8\vc\include\stdlib.h(820) : see declaration of 'itoa' Message: 'The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _itoa. See online help for details.' c:\continuum server\server\subbill3\linkedlist.h(561) : warning C4267: '=' : conversion from 'size_t' to 'LONG', possible loss of data c:\continuum server\server\subbill3\prng.h(98) : error C2065: 'i' : undeclared identifier c:\continuum server\server\subbill3\declares.h(372) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\continuum server\server\subbill3\declares.h(372) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data c:\continuum server\server\subbill3\declares.h(479) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data c:\continuum server\server\subbill3\declares.h(523) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data c:\continuum server\server\subbill3\declares.h(554) : warning C4267: 'return' : conversion from 'size_t' to 'SHORT', possible loss of data c:\continuum server\server\subbill3\declares.h(564) : warning C4267: 'return' : conversion from 'size_t' to 'SHORT', possible loss of data c:\continuum server\server\subbill3\declares.h(622) : warning C4244: '=' : conversion from 'SOCKET' to 'unsigned int', possible loss of data c:\continuum server\server\subbill3\declares.h(665) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data c:\continuum server\server\subbill3\encryption.h(133) : error C2065: 'L' : undeclared identifier c:\continuum server\server\subbill3\rpc.h(1582) : warning C4267: '+=' : conversion from 'size_t' to 'SHORT', possible loss of data c:\continuum server\server\subbill3\rpc.h(1612) : warning C4267: '+=' : conversion from 'size_t' to 'SHORT', possible loss of data c:\continuum server\server\subbill3\rpc.h(1740) : warning C4267: '=' : conversion from 'size_t' to 'SHORT', possible loss of data c:\continuum server\server\subbill3\dbase.h(481) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data c:\continuum server\server\subbill3\dbase.h(486) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data c:\continuum server\server\subbill3\dbase.h(491) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data c:\continuum server\server\subbill3\dbase.h(821) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data c:\continuum server\server\subbill3\dbase.h(860) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data c:\continuum server\server\subbill3\dbase.h(979) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data c:\continuum server\server\subbill3\dbase.h(1115) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data c:\continuum server\server\subbill3\dbase.h(1116) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data c:\continuum server\server\subbill3\dbase.h(1130) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data c:\continuum server\server\subbill3\dbase.h(2264) : warning C4244: '=' : conversion from 'LONG' to 'short', possible loss of data Build log was saved at "file://c:\Continuum Server\Server\SubBill3\Debug\BuildLog.htm" SubBill3 - 3 error(s), 36 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== |
Code: Show/Hide c:\continuum server\server\subbill3\prng.h(98) : error C2065: 'i' : undeclared identifier
c:\continuum server\server\subbill3\declares.h(372) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\continuum server\server\subbill3\encryption.h(133) : error C2065: 'L' : undeclared identifier |
Code: Show/Hide #pragma warning( disable : 4267 ) |