Postado Julho 28, 2015 9 anos [28/07/2015 13:44:23] [Error - CreatureScript Interface] [28/07/2015 13:44:23] data/creaturescripts/scripts/GuildFragsKill.lua:onKill [28/07/2015 13:44:23] Description: [28/07/2015 13:44:23] data/creaturescripts/scripts/GuildFragsKill.lua:4: attempt to call global 'addFragsByGuild' (a nil value) [28/07/2015 13:44:23] stack traceback: Aparece isso na distro..Acon tece quando um player ataca o outro e esse outro fica com 0 de life e nao morre, o xar fica bugado... oq pode ser? oq tenho q fazer?
Postado Julho 28, 2015 9 anos Provavelmente algum prepareDeath está no return false e não heala o player. Se não for essa função é algo parecido. Se quiser sua dúvida tirada, mande PM com os links, e não com a dúvida (outros podem ter a mesma dúvida, e o fórum serve para ser usado). Tópicos: [FAQ] BBCODE [LIB] Constant [RME] Administrando bordas. [TALK] Broadcast Editável. [TALK] Sugest. [TALK] Checkpoint. [MOVE] Pântano pegajoso. [ACTION] Piggy Bank. (Cassino). [GLOBAL] Uptime Ad. [C0DE] Consertando 'Invalid Password' [PROGRAM] Quest Maker
Postado Julho 28, 2015 9 anos Essa função addFragsByGuild esta retornando nulo, existe ela no seu servidor/distro? STYLLER OT 2022
Postado Julho 28, 2015 9 anos Autor minha GuildFragsKill.lua ta assim function onKill(cid, target, lastHit) local config = {MaxDifLevel = 50, MyGuild = getPlayerGuildName(cid)} if isPlayer(cid) and isPlayer(target) and HaveGuild(cid) and HaveGuild(target) and getPlayerGuildId(cid) ~= getPlayerGuildId(target) and getPlayerIp(target) ~= getPlayerIp(cid) and math.abs(getPlayerLevel(cid) - getPlayerLevel(target)) <= config.MaxDifLevel and getGlobalStorageValue(frag_guild.start_frags) <= 0 then addFragsByGuild(config.MyGuild,frag_guild.FragsPerKill) doBroadCastGuild(config.MyGuild,20,'[Guild Frag System] Your guild received '..frag_guild.FragsPerKill..' frag because have killed a player another guild, now your guild have '..getFragsByGuild(config.MyGuild)..' frags') if getFragsByGuild(config.MyGuild) >= frag_guild.FragsToWinAcess then addAcess(config.MyGuild, frag_guild.AcessTimeDays) addHonorPoints(config.MyGuild, frag_guild.Honor_Point) doBroadcastMessage("[Guild Frag System]\nThe guild ["..config.MyGuild.."] is dominant for having achieved "..frag_guild.FragsToWinAcess.." Frags!\nYour domain ends in "..getAcessDate(config.MyGuild)) cleanGuildFrags() setGlobalStorageValue(frag_guild.start_frags, 1) if frag_guild.MoreExpToGuild == true then local players = {} for _, cid in pairs(getPlayersOnline()) do if getPlayerGuildName(cid) == config.MyGuild then table.insert(players, cid) end end for i = 1, #players do doPlayerSetExperienceRate(players[i], frag_guild.Exp_Rate) end end end end return TRUE end preparedeath.lua estao asssim -- Sebasbe and Nicekid -- function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if isPlayer(cid) == TRUE then if (getPlayerSlotItem(cid, 2).itemid == 7890) and getPlayerSkullType(cid) >= 0 then doPlayerRemoveItem(cid, 7890, 1) doCreatureSetDropLoot(cid, false) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA) return TRUE end end return TRUE end
Postado Julho 28, 2015 9 anos Já disse, o problema é na função: addFragsByGuild(config.MyGuild,frag_guild.FragsPerKill) STYLLER OT 2022
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.