My controls give me an error that says "Function call 'wrapvalue' expects parameters in brackets at line 49". I understand what it is telling me, but I can't seem to find a solution. Here's my code-
rotate camera camera angle x(0)+(mousemovey()/2.0),camera angle y(0)+(mousemovex()/2.0),0
cx#=camera angle x(0) : cy#=camera angle y(0)
if KEYSTATE(17)=1 then xrotate camera 0,0 : move camera 0,0.2 : xrotate camera 0,cx#
if KEYSTATE(31)=1 then xrotate camera 0,0 : move camera 0,-0.2 : xrotate camera 0,cx#
if KEYSTATE(30)=1 then yrotate camera 0,cy#-90 : move camera 0.2 : yrotate camera 0,cy#
if KEYSTATE(32)=1 then yrotate camera 0,cy#+90 : move camera 0.2 : yrotate camera 0,cy#
if wrapvalue(camera angle x(0))>40 and wrapvalue(camera angle x(0))180 then xrotate camera 0,40 *this is line 49*
if wrapvalue(camera angle x(0))>180 and wrapvalue(camera angle x(0))280 then xrotate camera 0,280
I have no idea what I'm going wrong, so I'd appreciate all the help I can get.
Making my way through life one line of code at a time...