Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,310 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Possible bug in compare? #317811
04/02/10 18:00
04/02/10 18:00
Joined: Apr 2002
Posts: 224
Twickenham,England
kiamonster Offline OP
Member
kiamonster  Offline OP
Member

Joined: Apr 2002
Posts: 224
Twickenham,England
I just ran the update tp 7.82.

I tend to code the full statement (no shortcuts)
so I coded (x coder and easier to debug at 3 am if '== 1'
is included)

wh2 = snd_play(w_xtable, svol,0);
while(snd_playing(wh2) == 1) {wait(1);}

This previously worked, so I was surprised when it
stopped working after the update.
The below (no '==1' does work however.

wh2 = snd_play(w_xtable, svol,0);
while(snd_playing(wh2)) {wait(1);}

Both are I think correct, and if it is a bug can
see many problems!

Re: Possible bug in compare? [Re: kiamonster] #317812
04/02/10 18:10
04/02/10 18:10
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
There is no bug in "compare", I guess it must be a problem with
snd_playing(wh2) != 1 even when the sound is playing. Maybe the function returns some non-zero value, f.i. 3.1415, instead of 1, even though the manual says it should return 1 when the sound is playing.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Possible bug in compare? [Re: Superku] #317814
04/02/10 18:14
04/02/10 18:14
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
just, as a workaround, use != 0

Re: Possible bug in compare? [Re: Rei_Ayanami] #317859
04/03/10 06:58
04/03/10 06:58
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline
Serious User
pegamode  Offline
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
take a look in the manual:

snd_playing

Returns:
0 if a sound with this handle isn't playing, A7.82 otherwise the current play position within the sound buffer in bytes.


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1