Doing a for loop, call a different function, wait for the return data of that function before continue with the loop, getting the new data and continue with the loop… sorry Im so bad at explaining…
Here’s a quick funny “example” :v
local function wakamole(gotTaco)
local tacoPower = gotTaco + 50
-- SEND NEW TACO TO THE LOOP
return tacoPower
end
for c = 1, 10 do
local taco = spice * 2
-- SEND THE TACO TO THE WAKAMOLE FUNCTION
wakamole(taco)
-- WAIT FOR WAKAMOLE FUNCTION TO FINISH BEFORE TO CONTINUE
-- USING NEW TACO DATA
local FromWakamole = newTaco
print("new value of taco: ", newTaco)
end
Can someone please show me how to do it correctly?.. u ,u
I think you just need to store what the function returns to be able to use it later
for c = 1, 10 do
local taco = spice * 2
-- SEND THE TACO TO THE WAKAMOLE FUNCTION
local newTaco = wakamole(taco) -- store what the function returns in a variable
-- USING NEW TACO DATA
local FromWakamole = newTaco
print("new value of taco: ", newTaco)
end
Because this post was stopped for verification since yesterday… (idk why…) I had to figure it out by myself yesterday xD
Thank you so much, yeah the answer was so obvious xD, thanks anyway :3