There is an error with the x values, i dont know whats wrong with it
-- ap1
-- Use this function to perform your initial setup
function setup()
Timer = 0
watch("Timer")
game=Game(WIDTH/2,HEIGHT/2,768,768)
jobs=Jobs()
appel=Appel()
scoreboard=Scoreboard(WIDTH-100,HEIGHT-100,0)
end
function draw()
background(255, 255, 255, 255)
sprite("Documents:TapirProductions",WIDTH/2,HEIGHT/2,768,768)
if Timer >= 0 then
Timer = Timer + 0.01
end
if Timer == 0.01 then
sound(DATA, "ZgFAPjBLQE5oU1hAKyRFPgAAgD9tc/E+fwBAf0BASUBAZ0A7")
end
if Timer > 1 then
sprite("Documents:Appeltjes Vangen",WIDTH/2,HEIGHT/2,768,768)
Timer = Timer - 0.01
end
if Timer > 1.001 then
game:draw()
jobs:draw()
appel:draw()
scoreboard:draw()
if appel.x == jobs.x + 50 and appel.x == jobs.x - 50 and appel.y == jobs.y + 50 and appel.y == job.y - 50 then
scoreboard.i = scoreboard.i + 1
end
end
pushStyle()
spriteMode(CORNER)
sprite("Documents:Tpc",0,0,138,20)
popStyle()
end
function touched(touch)
if touch.x>=600 and touch.x<=600 +50 and touch.y>=200 and touch.y<=200 +50 and touch.state==BEGAN then
Timer = Timer + 0.01
end
end
error: error: [string "-- ap1..."]:41: attempt to perform arithmetic on field 'x' (a nil value)
This is line 41:
if appel.x == jobs.x + 50 and appel.x == jobs.x - 50 and appel.y == jobs.y + 50 and appel.y == job.y - 50 then
- keeper1902