Postado Julho 19, 2015 9 anos Galera tem um script(link do topico aqui) de talkaction do xWhiteWolf que da erro no meu server mas eu nem editei e nao tem nada errado, veja o erro: [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/broadcastplayers.lua:6: '}' expected (to close '{' at line 1) near 'price' [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/broadcastplayers.lua) data/talkactions/scripts/broadcastplayers.lua:6: '}' expected (to close '{' at line 1) near 'price' Aqui esta o script do Broadcast por completo: Mostrar conteúdo oculto local config = { storage = 19400, -- storage em que será salvo o tempo cor = "advance", -- de acordo com o constant.lua da lib tempo = 2, -- em minutos itemid = 2160 --- id do item que vai ser cobrado price = 1, -- preço pra usar o broadcast level = 30 -- level pra poder utilizar o broadcast } function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end if getPlayerLevel(cid) >= config.level then if getPlayerStorageValue(cid, config.storage) - os.time() <= 0 then if doPlayerRemoveItem(cid, config.itemid, config.price) then setPlayerStorageValue(cid, config.storage, os.time() + (config.tempo*60)) doBroadcastMessage("[BROADCAST] "..getCreatureName(cid)..": "..param.."", config.cor) doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You have successfully sent a broadcast, now you'll have to wait " ..config.tempo.. " minute(s) until you broadcast again.") return false else doPlayerSendCancel(cid, "You don't have " ..config.price.. " gp's for broadcasting.") return false end else doPlayerSendCancel(cid, "You have to wait " ..(getPlayerStorageValue(cid, config.storage) - os.time()).. " seconds until you can broadcast again.") return false end else doPlayerSendCancel(cid, "You have to be level " ..config.level.. " or more in order to use broadcast.") end end OBRIGADO POR ME AJUDAR! REP+ PARA TODOS QUE TENTAREM! @up Editado Julho 19, 2015 9 anos por TsplayerT (veja o histórico de edições)
Postado Julho 20, 2015 9 anos Solução local config = { storage = 19400, -- storage em que será salvo o tempo cor = "advance", -- de acordo com o constant.lua da lib tempo = 2, -- em minutos itemid = 2160, --- id do item que vai ser cobrado price = 1, -- preço pra usar o broadcast level = 30 -- level pra poder utilizar o broadcast } function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end if getPlayerLevel(cid) >= config.level then if getPlayerStorageValue(cid, config.storage) - os.time() <= 0 then if doPlayerRemoveItem(cid, config.itemid, config.price) then setPlayerStorageValue(cid, config.storage, os.time() + (config.tempo*60)) doBroadcastMessage("[BROADCAST] "..getCreatureName(cid)..": "..param.."", config.cor) doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You have successfully sent a broadcast, now you'll have to wait " ..config.tempo.. " minute(s) until you broadcast again.") return false else doPlayerSendCancel(cid, "You don't have " ..config.price.. " gp's for broadcasting.") return false end else doPlayerSendCancel(cid, "You have to wait " ..(getPlayerStorageValue(cid, config.storage) - os.time()).. " seconds until you can broadcast again.") return false end else doPlayerSendCancel(cid, "You have to be level " ..config.level.. " or more in order to use broadcast.") end end Faltava uma ,(virgula) depois do 2160... Editado Julho 20, 2015 9 anos por joadson (veja o histórico de edições)
Postado Julho 20, 2015 9 anos Autor Em 20/07/2015 em 04:31, joadson disse: local config = { storage = 19400, -- storage em que será salvo o tempo cor = "advance", -- de acordo com o constant.lua da lib tempo = 2, -- em minutos itemid = 2160, --- id do item que vai ser cobrado price = 1, -- preço pra usar o broadcast level = 30 -- level pra poder utilizar o broadcast } function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end if getPlayerLevel(cid) >= config.level then if getPlayerStorageValue(cid, config.storage) - os.time() <= 0 then if doPlayerRemoveItem(cid, config.itemid, config.price) then setPlayerStorageValue(cid, config.storage, os.time() + (config.tempo*60)) doBroadcastMessage("[BROADCAST] "..getCreatureName(cid)..": "..param.."", config.cor) doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You have successfully sent a broadcast, now you'll have to wait " ..config.tempo.. " minute(s) until you broadcast again.") return false else doPlayerSendCancel(cid, "You don't have " ..config.price.. " gp's for broadcasting.") return false end else doPlayerSendCancel(cid, "You have to wait " ..(getPlayerStorageValue(cid, config.storage) - os.time()).. " seconds until you can broadcast again.") return false end else doPlayerSendCancel(cid, "You have to be level " ..config.level.. " or more in order to use broadcast.") end end Faltava uma ,(virgula) depois do 2160... FILHO DA @#$%!!! kkkkkkkkkk só isso? Obrigado!
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.