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

Erros on CONSOLE

f@bio

Fudera Otserver
Joined
Jul 10, 2007
Messages
213
Reaction score
0
Location
Brasil
Hello friends, i'm use TFS 0.2.11 8.1 server and i have many actions/ moviments with console erros, but work on server correctly.

-- See exemple:

Code:
--Parede de Fogoo POI by F@bio-- 
function onStepIn(cid, item, frompos, item2, topos)  

msg = "Burning!" 

if item.itemid == 5062 then 
  doPlayerSendTextMessage(cid, 22, msg) 
  doPlayerAddMana(cid,-10) 
  doCreatureAddHealth(cid,-20)
  doSendMagicEffect(getPlayerPosition(cid),15) 
end 
return 1 
end

-- and this is a erros when a monster spet on tile

Code:
Lua Script Error: [MoveEvents Interface]
data/movements/scripts/outros/firewall.lua:onStepIn

luaDoPlayerSendTextMessage(). Player not found

Lua Script Error: [MoveEvents Interface]
data/movements/scripts/outros/firewall.lua:onStepIn

luaDoPlayerAddMana(). Player not found

Lua Script Error: [MoveEvents Interface]
data/movements/scripts/outros/firewall.lua:onStepIn

attempt to index a number value

Some scripts on movments and actions make this error, but when player execut this work fine, but when a monster step on it make all erros on console, i want to retire all erros because many erros crash the server...


No more, thx

F@bio
 
As, you maybe know, you cant send messages to monster, or change his mana :) Thats why there error are showed.

If you want to be it was only active for players then
if isPlayer(cid) then
 
Try this..

Code:
--Parede de Fogoo POI by F@bio-- 
function onStepIn(cid, item, frompos, item2, topos)  

msg = "Burning!" 

  if isPlayer(cid)and item.itemid == 5062 then 
  doPlayerSendTextMessage(cid, 22, msg) 
  doPlayerAddMana(cid,-10) 
  doCreatureAddHealth(cid,-20)
  doSendMagicEffect(getPlayerPosition(cid),15) 
end 
return 1 
end

Test, don't know this will go work
 
many thx, i'm test and edit this....

Hey friend don't work the question if you say, the error can be appear whean a monster spet on tile.... plx help me friends....
 
Last edited:
Back
Top