Having a bad day..

Monkey Targets Forums/Flash/Having a bad day..

Paul - Taiphoz(Posted 2013) [#1]
D:\Source\Monkey\StickRun\stickrun.build\flash\MonkeyGame.as(1938): col: 60 Error: Implicit coercion of a value
of type Boolean to an unrelated type int.

	chan.channel = chan.sample.sound.play(timeMillis, chan.loops, chan.transform);


the funny thing is....

	If ((Millisecs()-Self.TrackTime)>Self.TrackDelay) And (Self.TrackPlaying = False)
		'PlaySound(Self.Track,0,0)
		Self.TrackPlaying = True
	End If


any idea's on this, I have deleted the build folder a number of times, I don't get why it's failing to even get started with a build when the PlaySound function is commented out am I missing something really stupid. ?


Paul - Taiphoz(Posted 2013) [#2]
Oh yeah, the self.Track string holds this.

		#If TARGET="flash" Or TARGET="html5" Or TARGET="android" Or TARGET="ios" Or TARGET="xna"
			Self.Track = LoadSound("video/"+_track+".mp3")
		#Elseif TARGET="glfw" Or TARGET="psm"
			Self.Track = LoadSound("video/"+_track+".wav")
		#Else
			Self.Track = LoadSound("video/"+_track+".mp3")
		#End



therevills(Posted 2013) [#3]
Time to update your version of Diddy ;)


Paul - Taiphoz(Posted 2013) [#4]
worried an update might break something else, whats the issue ?


Paul - Taiphoz(Posted 2013) [#5]
Oh I should say that while I am using diddy, this little class and any code related to it is just using normal monkey/mojo code I am trying to keep it modular so I can just drop it into any project and have it work.

That's why im using LoadSound and PlaySound and not diddy's ?diddies? sound system.


Paul - Taiphoz(Posted 2013) [#6]
I am using the most upto date version of diddy, all my repo dots are green.

this is really annoying me now lol, looking at the outputting .as code its an issue with this function

	static public function seekMusic(timeMillis:int):int {
		if(bb_audio_device) {
			var chan:gxtkChannel = bb_audio_device.channels[32];
			if(chan.channel) {
				chan.channel.stop();
				chan.channel = chan.sample.sound.play(timeMillis, chan.loops, chan.transform);
			}
		}
		// TODO: check it worked
		return 1;
	}


which is all the more baffling because my code currently has ZERO sound loaded, and is attempting to play NOTHING lol, it's goto be something else, if it's diddy why would it call that function if I'm not actually trying to play any or dont have any sounds.


Paul - Taiphoz(Posted 2013) [#7]
therevills ?

I'm thinking this has to be diddy, but I cant figure out why, why would diddy initialize or try and play an audio file when I'm not actually telling it to?


Paul - Taiphoz(Posted 2013) [#8]
ok downloaded the latest release build and it's still failing on flash, builds to everything else, but flash has a fit and throws its poop in my face.

god I wana slap it.


therevills(Posted 2013) [#9]
This was fixed with this update:
http://code.google.com/p/diddy/source/detail?r=dee646d62d6bfd90480dda3f6cc49dd6a2578b17

Mark changed Mojo and broke Diddy ;)


Paul - Taiphoz(Posted 2013) [#10]
I wonder why its not working then cos I downloaded the latest zip, and I had an upto date repo cloned...

can you make a fresh zip?


Paul - Taiphoz(Posted 2013) [#11]
gona delete all my local copies and make sure I have the most upto date repo version, that should solve it then.

thanks for the info mate, glad its an easy fix, got no clue why my version of the repo got out of sync tho.


therevills(Posted 2013) [#12]
Unfortunately in the future there will be no more zips, due to that Google is stopping downloads via the GoogleCode site:
http://google-opensource.blogspot.com.au/2013/05/a-change-to-google-code-download-service.html

I'll have to set up Google Drive... which would be a bit of a pain.


Paul - Taiphoz(Posted 2013) [#13]
Oh that sucks , yeah either google drive or Dropbox.

You never know mark might add svn,hg,git hosting as part of the new site design.


rIKmAN(Posted 2013) [#14]
You never know mark might add svn,hg,git hosting as part of the new site design.

Taiphoz wake up....I think you are dreaming! :)