• 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!

Extended OPCodes OTClient and TFS

secondlife

Member
Joined
Aug 1, 2009
Messages
298
Reaction score
23
Hi guys,
I am trying to implement Extended Opcodes in my otc/server.
Im using this system from @BeniS:
Extended Opcodes (Server Side)

The opcode source it works correctly, but the script .LUA no.

My code extendedopcode.lua is:
Code:
function onExtendedOpcode(cid, opcode, buffer)
   local premiumTime = getPlayerPremiumDays(cid)
   doSendPlayerExtendedOpcode(cid, 52, "premiumTime")
  return true
  end

Return this error in console when i login with OTC:
Code:
[4:7:34.238] [Error - CreatureScript Interface]
[4:7:34.238] data/creaturescripts/scripts/extendedopcode.lua:onExtendedOpcode
[4:7:34.238] Description:
[4:7:34.238] data/creaturescripts/scripts/extendedopcode.lua:3: attempt to call global 'doSendPlayerExtendedOpcode' (a nil value)
[4:7:34.238] stack traceback:
[4:7:34.238]    data/creaturescripts/scripts/extendedopcode.lua:3: in function <data/creaturescripts/scripts/extendedopcode.lua:1>

I have tried in many ways, without success. I can't find where is the error..

Someone can help me?

Thank you guys!!
 
Hi guys,
I am trying to implement Extended Opcodes in my otc/server.
Im using this system from @BeniS:
Extended Opcodes (Server Side)

The opcode source it works correctly, but the script .LUA no.

My code extendedopcode.lua is:
Code:
function onExtendedOpcode(cid, opcode, buffer)
   local premiumTime = getPlayerPremiumDays(cid)
   doSendPlayerExtendedOpcode(cid, 52, "premiumTime")
  return true
  end

Return this error in console when i login with OTC:
Code:
[4:7:34.238] [Error - CreatureScript Interface]
[4:7:34.238] data/creaturescripts/scripts/extendedopcode.lua:onExtendedOpcode
[4:7:34.238] Description:
[4:7:34.238] data/creaturescripts/scripts/extendedopcode.lua:3: attempt to call global 'doSendPlayerExtendedOpcode' (a nil value)
[4:7:34.238] stack traceback:
[4:7:34.238]    data/creaturescripts/scripts/extendedopcode.lua:3: in function <data/creaturescripts/scripts/extendedopcode.lua:1>

I have tried in many ways, without success. I can't find where is the error..

Someone can help me?

Thank you guys!!
This error means that doSendPlayerExtendedOpcode is not a function in your server, did you compile the new server executable after the source changes?
 
@Thanatos_ hiii, thank you for reply.

yes, i have already compiled this function. Is the error really in this "doSendPlayerExtendedOpcode"?
 
@Thanatos_ hiii, thank you for reply.

yes, i have already compiled this function. Is the error really in this "doSendPlayerExtendedOpcode"?
Yes, if you replace with some random thing like doOpcodeExtended(cid, 52, "premiumTime") the screen will say attempt to call global 'doOpcodeExtended' (a nil value) because it's not a recognized function.
 
How do opcodes work? Can someone explain me how do I send a new information to the client?
In player.h I've made an attribute called "autolootgold = false;" how can I send it to server through opcodes?
Just for example, cause what I really need is to send the player attack speed.
 
Back
Top