Imposter Posted July 23, 2012 Share Posted July 23, 2012 if getElementID(cari) = getPlayerAccount (source), "cari") then --some code-- else outputChatBox ( "This car is not yours!" , source) setElementHealth (getElementData (source, "hiscari"), 0) destroyElement(cari) removeElementData (source, "hiscari") end what am i doing wrong, im getting an error saying that 'then' isnt there but it is... Link to comment
AMARANT Posted July 23, 2012 Share Posted July 23, 2012 local account = getPlayerAccount (source) if getElementID(cari) == getAccountData (account, "cari") then --some code-- else outputChatBox ( "This car is not yours!" , source) setElementHealth (getElementData (source, "hiscari"), 0) destroyElement(cari) removeElementData (source, "hiscari") end But you should show the full code because I don't know what are you checking in that line which is obviously wrong: if getElementID(cari) = getPlayerAccount (source), "cari") then -- WRONG! Link to comment
Imposter Posted July 24, 2012 Author Share Posted July 24, 2012 local account = getPlayerAccount (source) if getElementID(cari) == getAccountData (account, "cari") then --some code-- else outputChatBox ( "This car is not yours!" , source) setElementHealth (getElementData (source, "hiscari"), 0) destroyElement(cari) removeElementData (source, "hiscari") end But you should show the full code because I don't know what are you checking in that line which is obviously wrong: if getElementID(cari) = getPlayerAccount (source), "cari") then -- WRONG! thanks to you, i successfully got my car system finished AMARANT FTW! Link to comment
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