|
Post by AutoBOT on Sept 4, 2017 14:37:37 GMT
should we really make them a function first before its working?
i want to do something like this, but it wont work
local status = pcall(wait(image, 10))
right now im using function
function waiting() local status = pcall(wait(image, 10))
end pcall(waiting)
|
|
|
Post by AnkuLua on Sept 4, 2017 15:37:11 GMT
Why don't you use exists() Refer to the pcall usage. www.lua.org/pil/8.4.htmlFor pcall you should use local status, result = pcall(wait, image, 10)
|
|
|
Post by AutoBOT on Sept 4, 2017 16:02:35 GMT
ah so thats how you use it if the function have a parameter.
cant, because with exists doesnt matter if its found or not, it will continue.
|
|
|
Post by AnkuLua on Sept 4, 2017 16:15:39 GMT
The way to use exists
if (exists(image, 10)) then
.... do what image exists else
.... do what image doesn't exist end
|
|