xArgonx Posted July 8, 2009 Posted July 8, 2009 Hello, i'm scripting MTA server and try to make the garages open, but every time i get this error: error line 5: '(' expected near local' here is the script code: GARAGE_ID = 12 function start local garageCube = createColCube(1337, 194, 28, 6, 10, 4) addEventHandler("onColShapeHit", garageCube, onGarageCubeHit) addEventHandler("onColShapeLeave", garageCube, onGarageCubeLeave) end function onGarageCubeHit(hitElement, matchingDimension) if (getElementType(hitElement) == "player") then if (not isGarageOpen(GARAGE_ID)) then setGarageOpen(GARAGE_ID, true) end end end i hope someone can help me...
robhol Posted July 8, 2009 Posted July 8, 2009 Errm.. the error message tells you exactly what is wrong. You're missing parentheses () at the end of your function name. You should probably read some more Lua basics before you start scripting. Do NOT PM ME for help unless invited. - New MTA Script Editor Scripting help "etiquette": understandable language, relevant code (ALL code if unsure), [Lua] tags, error messages with line numbers. Super simple stuff.
xArgonx Posted July 8, 2009 Author Posted July 8, 2009 thank you, i maked a few resource but this error i do not did before now i get a error message because createColCube attempts a nil value...
Dark Dragon Posted July 8, 2009 Posted July 8, 2009 createColCuboid Loads of fun for free! Also a lot of fun for free!
xArgonx Posted July 8, 2009 Author Posted July 8, 2009 yeah i already wound this, but it doesn't change anything : attemp to call global 'createColCubiod'
Dark Dragon Posted July 8, 2009 Posted July 8, 2009 >>>oid<<< not iod Loads of fun for free! Also a lot of fun for free!
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