ID:259276
 
It appears that PayDimes() automatically returns true if the user isn't connected to the Internet. It strikes me that it would be more appropriate to return 0. Discuss!

On 1/20/01 12:38 pm Guy T. wrote:
It appears that PayDimes() automatically returns true if the user isn't connected to the Internet. It strikes me that it would be more appropriate to return 0. Discuss!

Guy, you are a genius, as always.

Z
On 1/20/01 12:38 pm Guy T. wrote:
It appears that PayDimes() automatically returns true if the user isn't connected to the Internet. It strikes me that it would be more appropriate to return 0. Discuss!

Can you give me an example of what you are seeing? I did a couple of offline tests with PayDimes() and never got it to return anything, which strikes me as a bit odd because the connection should have timed out. Is it just returning a "success" immediately when you test it? That would definitely be wrong. It should at least report the inability to establish a network connection.
In response to Tom H.
Is it just returning a "success" immediately when you test it? That would definitely be wrong.

Hmph... that's what it was doing, but of course now I can't duplicate it. Maybe it was programmer error. I'll keep a lookout for it.
In response to Guy T.
On 1/23/01 8:38 pm Guy T. wrote:
Is it just returning a "success" immediately when you test it? That would definitely be wrong.

Hmph... that's what it was doing, but of course now I can't duplicate it. Maybe it was programmer error. I'll keep a lookout for it.

So is it returning a failure (0) now, or is it just not returning? My cable-modem connection causes my offline networking to act a bit funky so I never know if I am seeing the same things as the rest of you.

Anyway, Dan told me he'll look into this too, since it would definitely be a bad glitch to have.
In response to Tom H.
Anyway, Dan told me he'll look into this too, since it would definitely be a bad glitch to have.

This is the code I saw the problem in... the other night it would print "Thank you!" as soon as I clicked "Yes!".

Did I change something between then and now? Did I dream it all? I sure didn't have any luck duplicating the problem last night, so I may have just been misinterpreting results once again. Well, I guess it can't hurt to go over the BYONDimes code one more time, regardless. If there's one thing you can count on customers to get touchy about, it's money! :)

proc/Beg()
var/confirmText = "Yes!"
var/payNow = alert(mob, "Would you like to donate one BYONDime toward bonus shares for the engineers?", \
"Sporadic grovelware prompt", confirmText, "Not now")
if(payNow == confirmText)
if(mob.client.PayDimes(1,"Gughunter","SpaceTug donation"))
mob << "Thank you!"