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

my premmy bridge isnt working

Sean Larson

New Member
Joined
Oct 22, 2007
Messages
99
Reaction score
1
Location
Colorado
function onStepIn(cid, item, position, fromPosition)
teleportpos = {x=77,y=55,z=6}
if isPlayer(cid) == 1 then
if isPremium(cid) == 0 then
doTeleportThing(cid,teleportpos,FALSE)
doPlayerSendTextMessage(cid,'You must be premium to cross this bridge.',25)
end
end
end



I get an error that says "Event onuse not found. data/actions/scripts/other/rook bridge

Im confused cuz i dont want to have an ONUSE event i want an on stepin
 
Well, the code is messy, let me organize it for you:

Code:
onStepIn = function (cid, item, position, fromPosition)
    local teleportpos = {x=77,y=55,z=6}
    if ((isPlayer(cid) == TRUE) and (isPremium(cid) == FALSE)) then
        doTeleportThing(cid, teleportpos, FALSE)
        doPlayerSendTextMessage(cid, 25, 'You must be premium to cross this  bridge.')
    end
end

Now let's see, there are some errors in script:

doPlayerSendTextMessage, the correct syntax is:

doPlayerSendTextMessage(cid, MessageClasses, message)

And it isn't necessary to put two conditions to check if it is a player and later if it is premium.
Now, the error is because you have used onStepIn that is a movement, and not an action.
 
Back
Top