2 bytes. Just in the one position packet's case, it uses one byte, so it can shrink the packet's size. If the userid is over 255, it will always use the larger position packet.
Cyan~Fire - Sat Nov 01, 2003 11:01 pm
Post subject:
Oh. So you recommend I switch back to p->name?
50% Packetloss - Sat Nov 01, 2003 11:36 pm
Post subject:
ident starts at 0 and increments up for each player.
So if the bot was in the arena, it would be ident=0 then I entered then i would be Ident=1.
Cyan~Fire - Sun Nov 02, 2003 1:12 pm
Post subject:
Except it was just not getting an ident for players. The if (p->ident == blah) statement was true for every single player...
I'll just switch back to names, I guess.
Anonymous - Sun Nov 02, 2003 7:18 pm
Post subject:
try casting it to a string before you print it
sendPrivate(p,"your ident is " + (String)p->ident);
Cyan~Fire - Sun Nov 02, 2003 9:24 pm
Post subject:
No, the String class has its own operator for adding integers.
Anyway, I already switched back to p->name, so topic closed. But, thanks anyway.
Anonymous - Wed Nov 19, 2003 12:10 pm
Post subject:
it doesn't convert it to a String because you're adding a const char* and an integer, and then trying to convert the result to a String... if it did work you would have gotten a number... and clearly you didn't
Cyan~Fire - Wed Nov 19, 2003 4:12 pm
Post subject:
Other things I have tried worked like this... or at least I think so.
Thanks, but lol I've totally redone my system now to use Player struct pointers, instead of just one value. Makes a lot more sense.