Re: bgt, last sound won't stop after time is reached
Hi there,
problem is with the very first line:
if(pb.is_empty()==false and track.position>=pb[pb_index].pt)
if you let the index to go out of range, you'll get error here. If you won't, it will play forever because of the internal statements.
The best thing you can do here is probably:
if(pb.is_empty()==false and pb_index<pb.length-1 and track.position>=pb[pb_index].pt)
You can then omit all pb_index checks inside, as it will be in range for sure.
Best regards
Rastislav
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector