Tokio Posted December 27, 2017 Posted December 27, 2017 What wrong with this script? Spoiler rbs = {} function del(source,command) for index, roadb in ipairs(rbs) do destroyElement(roadb) end exports.fly_box:showBox (source,"info","Útzárak sikeresen törölve lettek!") end addCommandHandler("rbdel",del) function small(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(978,x,y,z-0.15,0,0,rotZ) ) setElementPosition ( source, x, y, z+1 ) exports.fly_box:showBox (source,"info","Útzár létrehozva!\nHasználat utáni törlése KÖTELEZŐ, /rbdel") end addCommandHandler("rb1",small) function large(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(981,x,y,z,0,0,rotZ+180) ) setElementID ( roadblockobject, rbo ) setElementPosition ( source, x, y, z+1 ) exports.fly_box:showBox (source,"info","Útzár létrehozva!\nHasználat utáni törlése KÖTELEZŐ, /rbdel") end addCommandHandler("rb2",large) function yellow(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(3578,x,y,z-0.2,0,0,rotZ) ) setElementID ( roadblockobject, rbo ) setElementPosition ( source, x, y, z+1 ) exports.fly_box:showBox (source,"info","Útzár létrehozva!\nHasználat utáni törlése KÖTELEZŐ, /rbdel") end addCommandHandler("rb3",yellow) function detour(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(3091,x,y,z-0.38,0,0,rotZ+180) ) setElementID ( roadblockobject, rbo ) setElementPosition ( source, x, y, z+1 ) exports.fly_box:showBox (source,"info","Útzár létrehozva!\nHasználat utáni törlése KÖTELEZŐ, /rbdel") end addCommandHandler("rb4",detour) function cone(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(1238,x,y,z-0.65,0,0,rotZ) ) setElementID ( roadblockobject, rbo ) setElementPosition ( source, x, y, z+1 ) exports.fly_box:showBox (source,"info","Útzár létrehozva!\nHasználat utáni törlése KÖTELEZŐ, /rbdel") end addCommandHandler("rb5",cone) function fence(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(1459,x,y,z-0.4,0,0,rotZ) ) setElementID ( roadblockobject, rbo ) setElementPosition ( source, x, y, z+1 ) exports.fly_box:showBox (source,"info","Útzár létrehozva!\nHasználat utáni törlése KÖTELEZŐ, /rbdel") end addCommandHandler("rb6",fence) function line(source,command) local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) table.insert(rbs, createObject(2957,x,y,z-2.6,0,0,rotZ) ) setElementID ( roadblockobject, rbo ) setElementPosition ( source, x, y, z+1 ) exports.fly_box:showBox (source,"info","Útzár létrehozva!\nHasználat utáni törlése KÖTELEZŐ, /rbdel") end addCommandHandler("rb7",line) setTimer(function() for index, roadb in ipairs( rbs ) do destroyElement( roadb ) end end, 7200000, 0) Error: script.lua:1: unexpected symbol near '?' How to fix this? My servers: Fun: Derby(DD):
DRW Posted December 28, 2017 Posted December 28, 2017 That usually means the file is not using UTF-8 encoding. Get something like Notepad++ and try this: 1 Proud owner and developer of ZNEXT: Aftermath. Enter a post-apocalyptic San Andreas and fight over 30 types of enemies and bosses with varying difficulties and skills, improve and customize your character by leveling up, completing challenges and a solid lootbox system with no Pay-to-Win mechanics that will break your experience. Meet new characters, creatures and weapon metas, experience an innovative combo-based melee system, or join our solid PvP modes to show other survivors who’s boss. Español, Pусский, Türk, عربى, Polski, Português IP: mtasa://104.36.110.227:22003 - Discord: https://discord.gg/CxMxjvC5pB
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now