Lopaskurwa
Well-Known Member
- Joined
- Oct 6, 2017
- Messages
- 890
- Solutions
- 2
- Reaction score
- 50
Getting this attempt to call method 'sendExtendedOpcode' (a nil value) on my spell, strangely i noticed for some reason it happens only for few people but for some it works perfectly, for some people are just executing the spell that does nothing just applies cooldown, but for some works perfectly and i see in terminal it gives this error and legit i dont understand how its possible, speculation is that some people losing player status somehow, because getting prints saying "Caster is not a Player object." this is the spell sendextendedopcode that i use
And this is in data\lib\core\player.lua
Legit lost and dont know how its even possible
Interesting factor is that it seems that relog fixes the issue after it starts happening again after multiple spell uses
LUA:
local function sendExtendedJson(player, action, data)
if not player or not player:isPlayer() then
print("Caster is not a Player object.")
return
end
if data == nil then
data = {}
end
player:sendExtendedOpcode(config.opCode, json.encode({action = action, data = data}))
end
Code:
function Player.sendExtendedOpcode(self, opcode, buffer)
if not self:isUsingOtClient() then
return false
end
local networkMessage = NetworkMessage()
networkMessage:addByte(0x32)
networkMessage:addByte(opcode)
networkMessage:addString(buffer)
networkMessage:sendToPlayer(self)
networkMessage:delete()
return true
end
Legit lost and dont know how its even possible
Post automatically merged:
Interesting factor is that it seems that relog fixes the issue after it starts happening again after multiple spell uses
Last edited: