Quote:Original post by SoliasQuote:Original post by graveyard filla
...anyway, basically when i write to a packet i do something like packet.write((Player_NetID)some_player->Get_NetID()). anyway, when i switched from it saying "Uint8" to "Player_NetID", i just wanted to turn on a warning so i could make sure i didnt screw up anywhere and forget to change it in some place.
also, some_player->Get_NetID() actually returns an integer, but Player_NetID is typedef'd to be an unsigned char.
Maybe make Get_NetID() return a Player_NetID instead of an int? That would make more sense to me anyway. The purpose of the type Player_NetID is to hold a player net ID, so any place you are going to have one of those just go ahead and use that type. Then if you need to change it in the future it will change everywhere. It seems like it's a bad idea to store it anywhere as an int if you aren't going to make it an int everywhere.
yes, but the problem is that some_player->Get_NetID() is a member of a parent class. this parent has a member called Mem_NetID which is a typedef to an int. Get_NetID() returns this..
Drew, thanks, ill look at that page.