I'm trying to make a simple script to show the player's current attack speed, example: your attack speed is 1,999x
unsuccessfully
erro:
unsuccessfully
erro:
Lua:[2023-16-03 22:13:13.324] [error] Lua script error: scriptInterface: [Scripts Interface] scriptId: [/home/canary-main/data-otservbr-global/scripts/talkactions/custom/speed.lua:callback] timerEvent: [] callbackId:[] function: [] error [...ata-otservbr-global/scripts/talkactions/custom/speed.lua:6: attempt to concatenate local 'voc' (a userdata value) stack traceback: [C]: in function '__concat' ...ata-otservbr-global/scripts/talkactions/custom/speed.lua:6: in function <...ata-otservbr-global/scripts/talkactions/custom/speed.lua:3>]
Lua:local speed = TalkAction("!speed") function speed.onSay(player, words, param) local voc = player:getVocation() voc:getBaseAttackSpeed() player:sendCancelMessage("You have " .. voc .. "% attack speed.") end speed:register()