Using java Syntax Highlighting
- ServerSendScore serverSendScore = (ServerSendScore) mMessagePool
- .obtainMessage(FLAG_MESSAGE_SERVER_SEND_SCORE);
- // new ServerSendScore(mCode);
- // Send it to client
- try {
- mSocketServer.sendBroadcastServerMessage(serverSendScore);
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- mMessagePool.recycleMessage(serverSendScore);
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
I get the below exception:
Using java Syntax Highlighting
- 04-22 10:00:02.142: E/AndroidRuntime(28894): Caused by: java.lang.ClassCastException: cy.ac.ucy.AndroidTeam.Connection.Client.ClientSendScore
- 04-22 10:00:02.142: E/AndroidRuntime(28894): at cy.ac.ucy.AndroidTeam.Game.MultiplayerGame$ServerInformClientAboutScore.doInBackground(MultiplayerGame.java:247)
- 04-22 10:00:02.142: E/AndroidRuntime(28894): at android.os.AsyncTask$2.call(AsyncTask.java:185)
- 04-22 10:00:02.142: E/AndroidRuntime(28894): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
- 04-22 10:00:02.142: E/AndroidRuntime(28894): ... 4 more
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
Whats the problem with that casting??
Also my game uses Box2D, and without MessagePools, the moving sprite, freezes..
