• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Help with error in console

Ashbringer

Almighty Ashe
Joined
Dec 24, 2011
Messages
334
Reaction score
18
Location
Germany
hey i have a player vs player place where they use a lever to enter it when 2 people stands in right place you just rightclick the lever then gets tp , but now to the problem ..... if i player try to start the match alone this comes up in the console

[30/11/2014 17:00:35] [Error - Action Interface]
[30/11/2014 17:00:35] data/actions/scripts/theend/pvparena/arenalever.lua:onUse
[30/11/2014 17:00:35] Description:
[30/11/2014 17:00:35] (internalGetPlayerInfo) Player not found when requesting player info #3

how do i make it so this not shows up in the console becouse it will be spam :/
 
easiest way is to delete the script if you dont need it, if you do need it post it here so we can have a look at fixing it

Rexy
 
easiest way is to delete the script if you dont need it, if you do need it post it here so we can have a look at fixing it

Rexy
i need it i want the 1 v 1 thing :)

Code:
local waittime = 5
local storage = 5568

function onUse(cid, item, fromPosition, itemEx, toPosition)

 if exhaustion.get(cid, storage) == FALSE then
                exhaustion.set(cid, storage, waittime)
        else
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You have to wait " .. exhaustion.get(cid, storage) .. " seconds.") 
        return true
       end  

    local firstPlayerPosition = {x = 32354, y = 32228, z = 8, stackpos = STACKPOS_TOP_CREATURE}
    local getFirstPlayer = getThingFromPos(firstPlayerPosition)
    local secondPlayerPosition = {x = 32356, y = 32228, z = 8, stackpos = STACKPOS_TOP_CREATURE}
    local getSecondPlayer = getThingFromPos(secondPlayerPosition)
    local arenaLevel = 120
    local firstPlayerLevel = getPlayerLevel(getFirstPlayer.uid)
    local secondPlayerLevel = getPlayerLevel(getSecondPlayer.uid)
    local newFirstPlayerPosition = {x = 32355, y = 32229, z = 13}
    local newSecondPlayerPosition = {x = 32360, y = 32229, z = 13}
    if(item.uid == 7001) then
        if(getFirstPlayer.itemid > 0 and getSecondPlayer.itemid > 0) then
            if(firstPlayerLevel >= arenaLevel and secondPlayerLevel >= arenaLevel) then
                for arenax = 32352, 32363 do
                    for arenay = 32226, 32232 do
                        local arenaPosition = {x=arenax, y=arenay, z=13, stackpos=253}
                        local arenaCreature = getThingFromPos(arenaPosition)
                        if(arenaCreature.itemid > 0 and isPlayer(arenaCreature.uid) == FALSE) then
                            if(isMonster(arenaCreature.uid) == TRUE) then
                                doRemoveCreature(arenaCreature.uid)
                            end
                        elseif(arenaCreature.itemid > 0 and isPlayer(arenaCreature.uid) == TRUE) then
                            doPlayerSendCancel(cid, "Wait for current duel to end.")
                            return TRUE
                        end
                    end
                end
                if(item.itemid == 1945) then
                    doTransformItem(item.uid, 1946)
                elseif(item.itemid == 1946) then
                    doTransformItem(item.uid, 1945)
                end
                doSendMagicEffect(firstPlayerPosition, 2)
                doSendMagicEffect(secondPlayerPosition, 2)
                doTeleportThing(getFirstPlayer.uid, newFirstPlayerPosition)
                doTeleportThing(getSecondPlayer.uid, newSecondPlayerPosition)
                doSendMagicEffect(newFirstPlayerPosition, 10)
                doSendMagicEffect(newSecondPlayerPosition, 10)
                doPlayerSendTextMessage(getFirstPlayer.uid, 18, "FIGHT!")
                doPlayerSendTextMessage(getSecondPlayer.uid, 18, "FIGHT!")
            else
                doPlayerSendCancel(cid, "Both fighters must have level 120.")
            end
        else
            doPlayerSendCancel(cid, "You need 2 players for a duel.")
        end
    end
    return TRUE
end
 
You can change getThingFromPos to getTopCreature, stackpos won't be needed then and check for isPlayer
Code:
if isPlayer(getFirstPlayer.uid) and isPlayer(getSecondPlayer.uid) then

Remove this
Code:
local firstPlayerLevel = getPlayerLevel(getFirstPlayer.uid)
local secondPlayerLevel = getPlayerLevel(getSecondPlayer.uid)
And replace firstPlayerLevel with getPlayerLevel(getFirstPlayer.uid) and secondPlayerLevel with getPlayerLevel(getSecondPlayer.uid) under that.
 
You can change getThingFromPos to getTopCreature, stackpos won't be needed then and check for isPlayer
Code:
if isPlayer(getFirstPlayer.uid) and isPlayer(getSecondPlayer.uid) then

Remove this
Code:
local firstPlayerLevel = getPlayerLevel(getFirstPlayer.uid)
local secondPlayerLevel = getPlayerLevel(getSecondPlayer.uid)
And replace firstPlayerLevel with getPlayerLevel(getFirstPlayer.uid) and secondPlayerLevel with getPlayerLevel(getSecondPlayer.uid) under that.
Should i remove this?
Code:
if isPlayer(getFirstPlayer.uid) and isPlayer(getSecondPlayer.uid) then
 
No, that's not in the script, replace it with this
Code:
if(getFirstPlayer.itemid > 0 and getSecondPlayer.itemid > 0) then
So remove that /\ and add the if statement with isPlayer instead.
 
No, that's not in the script, replace it with this
Code:
if(getFirstPlayer.itemid > 0 and getSecondPlayer.itemid > 0) then
So remove that /\ and add the if statement with isPlayer instead.
sorry but i dont understand :(

can you fix it for me?
Code:
local firstPlayerPosition = {x = 32354, y = 32228, z = 8, stackpos = STACKPOS_TOP_CREATURE}
    local getFirstPlayer = getThingFromPos(firstPlayerPosition)
    local secondPlayerPosition = {x = 32356, y = 32228, z = 8, stackpos = STACKPOS_TOP_CREATURE}
    local getSecondPlayer = getThingFromPos(secondPlayerPosition)
    local arenaLevel = 120
    local firstPlayerLevel = getPlayerLevel(getFirstPlayer.uid)
    local secondPlayerLevel = getPlayerLevel(getSecondPlayer.uid)
    local newFirstPlayerPosition = {x = 32355, y = 32229, z = 13}
    local newSecondPlayerPosition = {x = 32360, y = 32229, z = 13}

thats the 9 rows with local in the front
 
Remove this
Code:
local firstPlayerLevel = getPlayerLevel(getFirstPlayer.uid)
local secondPlayerLevel = getPlayerLevel(getSecondPlayer.uid)

Then under it you see this line
Code:
if(firstPlayerLevel >= arenaLevel and secondPlayerLevel >= arenaLevel) then

Replace firstPlayerLevel with getPlayerLevel(getFirstPlayer.uid) and secondPlayerLevel with getPlayerLevel(getSecondPlayer.uid).
 
Remove this
Code:
local firstPlayerLevel = getPlayerLevel(getFirstPlayer.uid)
local secondPlayerLevel = getPlayerLevel(getSecondPlayer.uid)

Then under it you see this line
Code:
if(firstPlayerLevel >= arenaLevel and secondPlayerLevel >= arenaLevel) then

Replace firstPlayerLevel with getPlayerLevel(getFirstPlayer.uid) and secondPlayerLevel with getPlayerLevel(getSecondPlayer.uid).
thanks man i worked :)
 
Back
Top