cat
to print the entire file :Df17401f
A Lonely Travel, M Purple Panic, M Depressed II, M The Shire, M Halloween Night, M Harvest, M Kobra 2, M Kobra, M Multeasymap, M Sunny Side Up - ddnet-maps#define ERROR
that only happens on windows http.cpp
there is ERROR
#define
dwarn
instead of using Result<_, _>
?log!
is cleaner imho#define ERROR
that only happens on windows http.cpp
there is ERROR
#define
d if(pPlayer->GetCharacter() == 0)
if(pPlayer->GetCharacter())
char aPlayerName[MAX_NAME_LENGTH] = "nameless tee";
int ClientID = -1;
for(int i = 0; i < MAX_CLIENTS; i++)
{
if(str_comp(aPlayerName, Server()->ClientName(i)) == 0)
{
ClientID = i;
break;
}
}
ClientID will be -1 if a player named nameless tee
wasn't found.if (pPlayer->GetCharacter() != 0)
is the same as
if (pPlayer->GetCharacter()
but definitely not the opposite using 1
is true xD1
if it exists. It's a pointer, and it points to a memory location. So when you take it as an integer, it'll not be 1. That would imply all characters point to the same memory!= 0
!= 0
== 1
g++ /tmp/G2nc4Yh94s.cpp
/tmp/G2nc4Yh94s.cpp: In function 'int main()':
/tmp/G2nc4Yh94s.cpp:14:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
14 | if(a == 1) {
| ~~^~~~