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

why this script dont work?

kimokimo

Kimo
Joined
Jan 25, 2011
Messages
821
Solutions
6
Reaction score
156
GitHub
karimadnan
today i started my first script its when player step in wrong tile he got teleported to temple but idk why dont work here is the script


PHP:
local config = {
local place = {x=1000, y=1000, z=7} --Where they will be teleported to
}

function onStepIn(cid, item, position, fromPosition)	
        doTeleportThing(cid, place)
	doSendMagicEffect(telepos, CONST_ME_ENERGYAREA)
	doPlayerSendTextMessage(cid, 22, "Wrong tile, start again!")
end
 
try it [not tested]
Code:
local place = {x=1000, y=1000, z=7} --Where they will be teleported to

function onStepIn(cid, item, position, fromPosition)    
        doTeleportThing(cid, place)
    doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ENERGYAREA)
    doPlayerSendTextMessage(cid, 22, "Wrong tile, start again!")
end
rep++ if helped :D
 
instead of deleting the config..
LUA:
local config = { 
local place = {x=1000, y=1000, z=7} --Where they will be teleported to 
} 

function onStepIn(cid, item, position, fromPosition)     
        doTeleportThing(cid, config.place) 
    doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ENERGYAREA) 
    doPlayerSendTextMessage(cid, 22, "Wrong tile, start again!") 
end
 
your script is fail and how come local config ={ > then local place? fail as hell :p
here the right one
Code:
local config = { 
place = {x=1000, y=1000, z=7} --Where they will be teleported to 
} 
 
function onStepIn(cid, item, position, fromPosition)     
        doTeleportThing(cid, config.place) 
    doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ENERGYAREA) 
    doPlayerSendTextMessage(cid, 22, "Wrong tile, start again!") 
end
 
Back
Top