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

Lua Talkaction promote script. Problem with LUA function [solved]

jakub742

Member
Joined
May 1, 2010
Messages
144
Solutions
2
Reaction score
20
Location
Slovakia
Hello. Im trying to make a talkaction script to promote players on 7.72. Im using a OTHire distro located here: https://otland.net/threads/7-72-othire-0-0-1b-based-in-otserv-trunk-latest.212153/

When im trying to use lua function setPlayerPromotionLevel() the server console keep spamming:

data/talkactions/scripts/promote.lua:19: attempt to call global 'setPlayerPromot
ionLevel' (a nil value)
stack traceback:
data/talkactions/scripts/promote.lua:19: in function <data/talkactions/s
cripts/promote.lua:1>

Before calling setPlayerPromotionLevel i check if playerID is not null and if ID is a player.

Here is my lua code: http://pastebin.com/tHPSJ3Mz

Thx for answer.
 
im pretty sure setPlayerPromotionLevel is increments of one, e.g sorcerer is 1, MS is 2 etc, and not actual voc id
 
im pretty sure setPlayerPromotionLevel is increments of one, e.g sorcerer is 1, MS is 2 etc, and not actual voc id
The problem isnt in second parameter. If i set it to 1 i still get this error.
I found many scripts here for promotion but none worked for me. Everytime i get an error because of setPlayerPromotionLevel function

data/talkactions/scripts/promote.lua:19: attempt to call global 'setPlayerPromot
ionLevel' (a nil value)
stack traceback:
data/talkactions/scripts/promote.lua:19: in function <data/talkactions/s
cripts/promote.lua:1>
 
Back
Top