Moderators Lord Henry Posted March 17, 2019 Moderators Posted March 17, 2019 I was trying to use the function getTrainTrack, but this function is only available from version 1.6 onwards, but actually we are on version 1.5.6 and this function still doesn't exist. I read the build information and this function was created in 2015. Why is it not available? If the function was removed, I think the wiki page should advise this. Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanks! Minhas contribuições para a comunidade: LordHenry - MTA Wiki Profile Inscreva-se no meu canal do YouTube: Lord Henry - Entertainment Discord Oficial do MTA: https://mtasa.com/discord Blacklist e Whitelist de Scripters: Planilha Por favor, não me envie mensagens privadas solicitando suporte. Crie um tópico no fórum em vez disso.
XaskeL Posted March 18, 2019 Posted March 18, 2019 (edited) it is written: that it is deleted and will appear only in 1.6 Edited March 18, 2019 by XaskeL
Moderators IIYAMA Posted March 18, 2019 Moderators Posted March 18, 2019 I am the one that requested this function. They moved it to 1.6 after my request. It was finished and added to 1.6 within a few days. @IIYAMA still wondering why, when it could have been easily added to 1.5.6. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Moderators Lord Henry Posted June 26, 2019 Author Moderators Posted June 26, 2019 On 18/03/2019 at 05:19, XaskeL said: it is written: that it is deleted and will appear only in 1.6 I know. I was the one who marked the deletion. Before my edit, the page doesn't mark the function disabled. (see page history) (now was fixed to disabled instead of deletion) Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanks! Minhas contribuições para a comunidade: LordHenry - MTA Wiki Profile Inscreva-se no meu canal do YouTube: Lord Henry - Entertainment Discord Oficial do MTA: https://mtasa.com/discord Blacklist e Whitelist de Scripters: Planilha Por favor, não me envie mensagens privadas solicitando suporte. Crie um tópico no fórum em vez disso.
savour Posted June 26, 2019 Posted June 26, 2019 Simple if would do it if getTrainTrack and type(getTrainTrack) == "function" then --... end You can also check if it does exist in the _G table (which contains all global functions provided by mta/Lua)
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