//Car
let xCars = [900, 550, 200]
let yCars = [155, 405, 235]
let carsSpeed = [7,10,7]
function ShowCar(){
image(carImage, xCars[0], yCars[0], 62, 40)
image(carImage2, xCars[1], yCars[1], 62, 40)
image(carImage3, xCars[2], yCars[2], 62, 40)
}
function MoveCar(){
xCars -= carsSpeed[0]
xCars -= carsSpeed[1]
xCars -= carsSpeed[2]
if(xCars[0] < -100)
xCars[0] = 900
if(xCars[1] < -100)
xCars[1] = 900
if(xCars[2] < -100)
xCars[2] = 900
}
Quando executo, aparece a seguinte mensagem "p5.js says: [Car1.js, line 7] image() was expecting Number for the second parameter, received an empty variable instead. If not intentional, this is often a problem with scope."
Não sei onde está o erro. Se puderem me ajudar eu agradeço.