#Hulk Posted January 5, 2018 Posted January 5, 2018 Hello guys, What's wrong ? Error attempt to perform arithmetic on global 'val' (a nil value) line 11 function show(cmd,value,posx,posy) if not (posx) or not (posy) then sx,sy = guiGetScreenSize() posx,posy = sx/2-150,sy/2-50 end show() x,y = posx,posy val = value tam = setTimer(function() logo() end,val*32,0) logo() end
Moderators IIYAMA Posted January 6, 2018 Moderators Posted January 6, 2018 `value` AND `val` are containing a nil value. They must contain a number value. If `value` contains a number value, it is all fixed. I can't help you any further than that with this code. 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
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