I dont understand what they want to me. Pls help

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By JustTon
func _process(delta):
	  if (position.x < 0): ||  (position.x > get_viewport_rect( ).size.x):  
		 speed.x *= -1 ; 
	
	 position += speed ;

Error parsing expression, misplaced 'or'

If i white ‘or’ > new error : error parsing expession, missplased '|'

Also: I think you don’t need semicolons ‘;’ after each line.

unfa | 2018-06-21 11:51

:bust_in_silhouette: Reply From: volzhs

you typed colon: in conditional statements.

if (position.x < 0): ||  (position.x > get_viewport_rect( ).size.x):
                   ^
:bust_in_silhouette: Reply From: anonymous

if (position.x < 0) : || (position.x > get_viewport_rect( ).size.x):

Should be:
if (position.x < 0) || (position.x > get_viewport_rect( ).size.x):