• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

C# error, tried everything

Joined
Dec 31, 2007
Messages
176
Reaction score
2
Location
Vivalla
i have no idea how to fix this... can someone assist me
Code:
8/1/2012 21:20:13 Unknown outgoing packet: 1D 
Last received packet types: CreatureHealth, CreatureOutfit, CreatureMove, 9F
8/1/2012 21:20:13 System.Exception: NetworkMessage try to get more bytes from a smaller buffer
   at Tibia.Packets.NetworkMessage.GetByte() in C:\Users\Isabel\Downloads\trunk\externals\tibiaapi\Packets\NetworkMessage.cs:line 152
   at Tibia.Packets.Incoming.TileAddThingPacket.ParseMessage(NetworkMessage msg, PacketDestination destination) in C:\Users\Isabel\Downloads\trunk\externals\tibiaapi\Packets\Incoming\TileAddThingPacket.cs:line 50
   at Tibia.Packets.ProxyBase.ParsePacketFromServer(Client client, NetworkMessage msg, NetworkMessage outMsg) in C:\Users\Isabel\Downloads\trunk\externals\tibiaapi\Packets\ProxyBase.cs:line 262
   at Tibia.Packets.Proxy.ServerReadCallBack(IAsyncResult ar) in C:\Users\Isabel\Downloads\trunk\externals\tibiaapi\Packets\Proxy.cs:line 572
Last received packet types: TileAddThing, CreatureMove, Ping, CreatureMove, CreatureHealth, CreatureOutfit, CreatureMove, 9F
 
Code:
Unknown outgoing packet: 1D Last received packet types: CreatureHealth, CreatureOutfit, CreatureMove, 9F8/1/2012 21:20:13 System.Exception: NetworkMessage try to get more bytes from a smaller buffer
Also, can you please stop... Copying and pasteing code?
 
that error comes when you're when you open the process? or when you edit the code?
if it is to edit the code, try changing the version of. NET framework.
From 4 Client to 4 Full
 
that error comes when you're when you open the process? or when you edit the code?
if it is to edit the code, try changing the version of. NET framework.
From 4 Client to 4 Full

.Net has nothing to deal with the array problem coming from the packet class he is using.
 
Code:
Unknown outgoing packet: 1D Last received packet types: CreatureHealth, CreatureOutfit, CreatureMove, 9F8/1/2012 21:20:13 System.Exception: NetworkMessage try to get more bytes from a smaller buffer
Also, can you please stop... Copying and pasteing code?

im not copy pasting code, fawk did you get that from? i was learning directive c, but be constructive, people assuming things are the ones that are lost in life. also i took care of the issue by declaring the incoming and outgoing ping packet. also thanks angelshitho, but that didnt work :)
 
Mind showing code?...

EDIT: Oh... well, you could resize the buffer, using this method (C++ code, convert it to C# yoursellf, I don't use C#):
[cpp]#include <string> // memcpy...
uint8_t *resize(uint8_t *oldArr, int new_size) {
uint8_t *newArr = new uint8_t[new_size];
memcpy(newArr, oldArr, sizeof(uint8_t) * new_size);

delete[] oldArr;
return newArr;
}

bool ensureCap(uint8_t *old, uint8_t **new_, int min, int max) {
if (min > max) {
int new_size = (max * 3) / 2 + 1;
if (new_size < min)
new_size = min;
*new = resize(old, new_size);
return false; // the array was copied to a new memory block, use it
}
return true;
}

// ...
[/cpp]
 
Last edited:
How is this related to C# when there is no source code provided? Its an error message telling you quite detailed that there is an unknown outgoing packet, and it even tells you the last recieved packet types before that error occured.
 
The exception that was thrown is pretty much self explanatory. "NetworkMessage try to get more bytes from a smaller buffer". Try to decrease the bytes you're trying to get from the buffer.
 
Back
Top