• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua debbug unknown (print)

Sigoles

Discord: @sigoles
Joined
Nov 20, 2015
Messages
1,209
Solutions
2
Reaction score
154
My server crashes randomly (rarely) and never figured out how to fix this bug. Would anyone help?

AXZxF12.png



Code:
void ProtocolGameBase::sendCancelWalk()
{
    NetworkMessage msg;
    msg.addByte(0xB5);
    msg.addByte(player->getDirection());
    writeToOutputBuffer(msg);
}
 
At this point type : print player. If it holds nullptr (which I think it does) simply try adding 'if' statement :

Code:
void ProtocolGameBase::sendCancelWalk()
{
  if (player){
   NetworkMessage msg;
    msg.addByte(0xB5);
    msg.addByte(player->getDirection());
    writeToOutputBuffer(msg);
  }
}
 
At this point type : print player. If it holds nullptr (which I think it does) simply try adding 'if' statement :

Code:
void ProtocolGameBase::sendCancelWalk()
{
  if (player){
   NetworkMessage msg;
    msg.addByte(0xB5);
    msg.addByte(player->getDirection());
    writeToOutputBuffer(msg);
  }
}

Humm man, I'll try (but I dont know reproduce this error, I'll make this change and wait few days :S) . Thanks !

@Printer man what you think?
 
Well if its not what I am saying, it might mean that you dealocated memory of some player withough getting rid of it from protocol class.
Either way good luck debugging it ;) Try scripts which are canceling player walks, nomove etc. and combine it with logout maybe.
 

Similar threads

Back
Top