local function pluspointonetimer(self, url, property)
print("increasing self.stage")
print(self.stage) -- prints 1.8
self.stage = self.stage+0.1 --advances one stage
print(self.stage) -- prints 1.9
self.delayed =1
end
and this in “update”:
if self.stage== 1.8 and self.enter then
if self.onceas == nil then
msg.post("#modemconnect", "play_sound" )
msg.post("#dialtone", "stop_sound" )
go.animate("#", "delayed", go.PLAYBACK_ONCE_FORWARD, 0, 1, 8, 0, pluspointonetimer)
self.onceas = 1
end
end
if self.stage== 1.9 then
print("download complete!") --this never prints
end
I get all the correct print outs from the local function, but i never get the printout from “self.stage==1.9”!!
This code works fine (with no change made to the local function!)
if self.stage== 1.8 and self.enter then
if self.onceas == nil then
msg.post("#modemconnect", "play_sound" )
msg.post("#dialtone", "stop_sound" )
go.animate("#", "delayed", go.PLAYBACK_ONCE_FORWARD, 0, 1, 8, 0, pluspointonetimer)
self.onceas = 1
self.stage = 1.9
end
end
if self.stage== 2 then
print("download complete!")
end
…actually I’ve always been really interested in how computers work. When I realised that computers can’t really generate random numbers, I spent a lot of time thinking about the nature of the universe.
Yes! And you know the weird thing? Humans are also very bad at generating random numbers and generally use similar processes to computers to think of something random. In fact, they do it worse.