RevManR Posted April 24, 2021 Share Posted April 24, 2021 Hi , I write a sample function to return me a value ! Before this function I have a table with rankingList name And I Have some data on table ! here is the code of the function to return me the rank type ! function gettheranktype(rankID) rankID= tonumber(rankID) if rankID> 0 and rankID < 10 then -- Check if rank more 0 than and lower 10 then return rankingList[rankID][5] -- now do it else return false end end everything's until here is Ok ! but the main question is : how I can get the returned value !? for example print returned value to outputChatBox() and etc ... Sorry for my bad english ! Best regards ! Link to comment
Tekken Posted April 24, 2021 Share Posted April 24, 2021 (edited) local value = gettheranktype(); print(tostring(value)); This is called defining a variable Edited April 24, 2021 by Tekken 1 Link to comment
RevManR Posted April 24, 2021 Author Share Posted April 24, 2021 25 minutes ago, Tekken said: local value = gettheranktype(); print(tostring(value)); This is called defining a variable Thanks , Got it 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