Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (Grant, TipmyPip, AndrewAMD), 12,724 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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: 225
Twickenham,England
kiamonster Offline OP
Member
kiamonster  Offline OP
Member

Joined: Apr 2002
Posts: 225
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 | 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