This code is not valid at all. First of all, when you paste code here, you can use the formatting button (it looks like {}) to format your code properly, like this:
extends Camera2D
func _ready():
pass
func _proccess():
zoom Vector2(2, 2)
Make sure to format your code so others can read it. The line numbers don't help at all. Here is what is wrong with your code as you've pasted it:
1) "process" is spelled wrong.
2) The _process
function includes a parameter, delta
which is the frame time. That line should read func _process(delta):
3) If you're trying to set the zoom
property of the camera, you must assign a value to it. It's a variable. So for example, you could say zoom = Vector2(2, 2)
to make the zoom level 2x.
4) There's no point in putting this in _process()
as that would assign 2x as the zoom every frame. Once it's set, you're not changing anything. You should probably put that line in _ready()
or just set it in the Inspector.
5) If you're trying to change the zoom every frame, then you need to assign a new, larger value every frame. I'm not sure why you'd want to do that, but you could try something like this:
func _process(delta):
if zoom.x < 10: # set a maximum zoom level
zoom += Vector2(1, 1) * delta # add to the zoom every frame