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

Function doAddBanishment

You can use:
  • doAddIpBanishment(ip[, mask[, length[, reason[, comment[, admin[, statement]]]]]])
  • doAddPlayerBanishment(name/guid[, type[, length[, reason[, action[, comment[, admin[, statement]]]]]]])
  • doAddAccountBanishment(accountId[, playerId[, length[, reason[, action[, comment[, admin[, statement]]]]]]])
  • doAddNotation(accountId[, playerId[, reason[, comment[, admin[, statement]]]]]])
 
Code:
doAddPlayerBanishment(param, PLAYERBAN_BANISHMENT, os.time() + 1 * 24 * 60 * 60, 23, ACTION_BANISHMENT, "Auto-Ban")
param should be name or player's GUID :p
 
ok, thanks.

I use:
PHP:
doAddPlayerBanishment(param, PLAYERBAN_BANISHMENT, os.time() + 1 * 24 * 60 * 60, 23, ACTION_BANISHMENT, "Auto-Ban (CavBot)")

Return error:
PHP:
[16:45:12.203] [Error - TalkAction Interface]
[16:45:12.203] data/talkactions/scripts/Ban.lua:onSay
[16:45:12.203] Description:
[16:45:12.203] data/talkactions/scripts/Ban.lua:62: attempt to i
ndex field '?' (a nil value)
[16:45:12.203] stack traceback:
[16:45:12.203]  data/talkactions/scripts/Ban.lua:62: in function
 <data/talkactions/scripts/Ban.lua:48>
 
ok, thanks.

I use:
PHP:
doAddPlayerBanishment(param, PLAYERBAN_BANISHMENT, os.time() + 1 * 24 * 60 * 60, 23, ACTION_BANISHMENT, "Auto-Ban (CavBot)")

Return error:
PHP:
[16:45:12.203] [Error - TalkAction Interface]
[16:45:12.203] data/talkactions/scripts/Ban.lua:onSay
[16:45:12.203] Description:
[16:45:12.203] data/talkactions/scripts/Ban.lua:62: attempt to i
ndex field '?' (a nil value)
[16:45:12.203] stack traceback:
[16:45:12.203]  data/talkactions/scripts/Ban.lua:62: in function
 <data/talkactions/scripts/Ban.lua:48>

you sure it's that line? :o
 
I do not return any error, but the player is not banned.


PHP:
doAddPlayerBanishment(account, PLAYERBAN_BANISHMENT, 3 * 60 * 3600, 23, ACTION_BANISHMENT, "Auto-Ban", getPlayerGUID(cid), 1)
 
Back
Top