Por
Mikhael
Olá ao executar a talkactions /tour aparece o seguinte erro:
Segue os seguintes scripts acima mencionado:
011-string.lua Na linha 43: tmp = str:sub(pos):trim()
string.explode = function (str, sep, limit)
if(type(sep) ~= 'string' or isInArray({tostring(str):len(), sep:len()}, 0)) then
return {}
end
local i, pos, tmp, t = 0, 1, "", {}
for s, e in function() return string.find(str, sep, pos) end do
tmp = str:sub(pos, s - 1):trim()
table.insert(t, tmp)
pos = e + 1
i = i + 1
if(limit ~= nil and i == limit) then
break
end
end
tmp = str:sub(pos):trim()
table.insert(t, tmp)
return t
end
Tour.lua Na linha 46: local playerstring = string.explode(getGlobalStorageValue(listsubscribe), ",")
local playerduel = 223023 -- playerstorage
local subscribe = 223024 -- playerstorage
local enabledtour = 223025 -- globalstorage
local listsubscribe = 223026 -- globalstorage
local countsubscribe = 223027 -- globalstorage
local start = 223028 -- globalstorage
local goldsub = 223029 -- globalstorage
local silversub = 223030 -- globalstorage
local bronzesub = 223031 -- globalstorage
local gold = 1
local silver = 2
local bronze = 3
function onSay(cid, words, param, frompos)
--local players = getPlayersOnline()
if getGlobalStorageValue(enabledtour) <= 0 then
return doPlayerSendTextMessage(cid,22,"Não está tendo evento.")
end
local modalidade = getGlobalStorageValue(enabledtour)
local frasemod = "Bronze"
if modalidade == gold then
frasemod = "Gold"
elseif modalidade == silver then
frasemod = "Silver"
end
local playerstring = string.explode(getGlobalStorageValue(listsubscribe), ",")
local subscribes = getGlobalStorageValue(countsubscribe)
local xxs = "Numero de Inscritos "..subscribes.." \nCategoria : "..frasemod.."\n"
xxs = xxs .."C = Classificado\nB = Batalhando\nA = Aguardando\n\n"
for _, pid in ipairs(playerstring) do
local player = getPlayerByName(pid)
if isPlayer(player) then
if getPlayerStorageValue(player,subscribe) >= 1 and getPlayerStorageValue(player,playerduel) >= 1 then
xxs = xxs .."[".. getCreatureName(player) .. "][C] [B] [on] lv = "..getPlayerLevel(player).."\n"
end
if getPlayerStorageValue(player,subscribe) >= 1 and getPlayerStorageValue(player,playerduel) <= 0 then
xxs = xxs .."[".. getCreatureName(player) .. "][C][A] [on] lv = "..getPlayerLevel(player).."\n"
end
else
xxs = xxs .."[".. pid .. "][OFFLINE] \n"
end
end
doShowTextDialog(cid, 2501, xxs)
return true
end
REP+ sem duvidar! agradeço desde já.
Posts Recomendados
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.