lunes, 22 de febrero de 2016

Errores inesperados | Unexpected errors

Español | English

Y justo cuando todo iba bien.. Me levanto con la intención de retomar donde dejé ayer, en la intercalación de las publicidades entre Admob y Tappx. Por lo que quería jugar el juego en la PC para ver que errores tiraba, pero al inicial me aparece " Null Reference: Object Reference not set to an instance of an Object" que en pocas palabras quiere decir que el código que debería comunicarse con el jugador, se rompió. 

Por un extraño motivo que todavía sigo sin entender el mismo código que vengo usando hace meses se arruino prácticamente solo, ya que aparecieron errores en partes del código que no toqué o en cosas que ya estaban solucionadas. Este error no permitía que el jugador se pueda mover o saltar. Por suerte utilizando unos métodos que no quería usar logré solucionar este problema, ahora la parte de los cubos que caen del cielo: estos caían desde que se iniciaba el juego, cosa que antes no pasaba.

Todo esto sumado a que todavía debía solucionar el problema con las publicidades. Inventé un sistema que, cuando una variable sea impar, se muestren las publicidades de Admob y cuando sea par, de Tappx. Lamentablemente las publicidades de Tappx no se muestran y las de Admob se muestran una sola vez.

Lo que empezó siendo una sola cosa a solucionar terminaron siendo tres errores que salieron de la nada. Por suerte, luego de solucionar estos tres errores, podré dar por terminado este proyecto, espero encontrar las soluciones pronto.

Actualización: Al parecer, era el AdRequest de Tappx lo que causaba los errores mágicos que aparecían antes, al remover esa línea de código vi como los errores desaparecieron y le volví todo a la normalidad. Luego veo que tengo un error: "exception jni init'd androidjavaclass with null ptr unity" que después de buscar averiguo que es no solo normal sino obvio que iba a tener ese error ya que estaba corriendo el juego desde la PC y no desde un dispositivo Android! por lo que volvimos al paso 1 de la intercalación de publicidades.

-L

--------------------------------------------------------------------------------------------
English

Just when things were going fine.. I wake up with the intention of picking up from where I left yesterday, the Admob and Tappx ad switch. So I wanted to play the game on the PC so I could see what errors it gave me, but after pressing play I get "Null Reference: Object reference not set to an instance of an Object", which in other words is saying that the code that should be communicating with the player, broke,

By some weird motive that I still can't understand the same code I've been using for months broke almost by itself, as there were errors in parts of the code I didn't touch or in things that were already solved. This error didn't allow the player to move or jump. But luckily, after using some methods which I was trying to avoid, I managed to solve this problem, know the cubes that fall from the sky: they begin to fall when I launch the game, which it didn't before.

All this plus that I have to solve the ads problem. I invented a system that, when a variable is odd, it shows Admob's ad, and when not, Tappx's. But Unfortunately the Tappx ads don't show and Admob's only show once.

Which began as only I thing to solve ended up being three errors which came from nowhere. Luckily, after solving this three erros, I can end this project, I hope to find the solutions soon.

Update: Apparently, Tappx's AdRequest was the one who caused the magical errors that I mentioned before, after removing that line of code I saw the errors disappear I set everything back to normal. then I see this error "exception jni init'd androidjavaclass with null ptr unity" which after searching its meaning I find out that it wasn't only normal but obvious that I'll get that error as I was playing in the PC and no from an Android device! So I came back to step one, the ads switch.

-L

No hay comentarios.:

Publicar un comentario