A PHP Error was encountered

Severity: 8192

Message: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4698

Backtrace:

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4698
Function: _error_handler

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4621
Function: _optimize_regexp_list_tokens_to_string

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 1655
Function: optimize_regexp_list

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2029
Function: optimize_keyword_group

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2168
Function: build_parse_cache

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/Process.php
Line: 45
Function: parse_code

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/models/Pastes.php
Line: 517
Function: syntax

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/controllers/Main.php
Line: 693
Function: getPaste

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/index.php
Line: 315
Function: require_once

Untitled - Stikked
From Perl Parakeet, 10 Years ago, written in JavaScript.
Embed
  1. //nave amigo
  2. var nave2 = {
  3.     x: 700,//posicion en x del inicio
  4.     y: 50,//posicion en y del inicio
  5.     width: 50,//anchura
  6.     height: 50,//altura de la nave
  7.     contador: 0
  8. };
  9.  
  10. function dibujarNave2() {
  11.     ctx.drawImage(imgEnemigo, nave2.x, nave2.y, nave2.width, nave2.height);
  12. }
  13.  
  14. var disparos2 = [];
  15.  
  16. function dibujarDisparos2(){
  17.     for(var i in disparos2){
  18.         var disparo2 = disparos2[i];
  19.         ctx.drawImage(imgDisparoE, disparo2.x,disparo2.y,disparo2.width,disparo2.height);
  20.     }
  21. }
  22.  
  23. function moverDisparos2(){
  24.     for(var i in disparos2){
  25.         var disparo2 = disparos2[i];
  26.         disparo2.y += 4;//velocidad disparo
  27.         disparo2.contador++;
  28.     }
  29.     disparos2 = disparos2.filter(function(disparo2){
  30.         return disparo2.y > 0;
  31.     });
  32.  
  33. function fire2(){
  34.    //Reproducir sonido y pararlo
  35.    sounddisparo.pause();
  36.    //sounddisparo.currentTime = 0;
  37.    sounddisparo.play();
  38.         disparos2.push({
  39.            x: nave2.x - -10,
  40.            y: nave2.y - -10,
  41.            width: 16,
  42.            height: 28
  43.         });
  44.     }
  45.  
  46. //-------------------------------------------Mover segunda nave------------------------------
  47.     //movimiento a a la izquierda, a
  48.     if (teclado[65] ) {
  49.         nave2.x -= 15;
  50.         if(nave2.x <0) {
  51.             nave2.x = 0;
  52.         }
  53.     }
  54.     //movimiento a a la derecha, d
  55.     if (teclado[68] ) {
  56.         var limitex = canvas.width - nave2.width;
  57.         nave2.x += 15;
  58.         if(nave2.x > limitex) {
  59.             nave2.x = limitex;
  60.         }
  61.     }
  62.    
  63.      if (teclado[53] ) {
  64.         //disparos, 5
  65.         if(!teclado.fire2){
  66.             fire2();
  67.             teclado.fire2 = true;
  68.         }
  69.     }
  70.    
  71.    else teclado.fire2 = false;
  72. if(nave2.estado == 'hit'){
  73.         nave2.contador++;
  74.         if(nave2.contador >= 20){
  75.             nave2.contador = 0;
  76.             nave2.estado = 'muerto';
  77.             juego.estado = 'perdido';
  78.                
  79.     //Reproducir sonido
  80.     soundGameOver.play();
  81.    
  82.             textoRespuesta.titulo= '¡Game Over, el submarino gano!';
  83.             textoRespuesta.subtitulo = 'Presiona R para volver a intentarlo.';
  84.             textoRespuesta.contador = 0;
  85.         }
  86.     }
  87.     //-----------------------------------------------------------------
  88.  
  89.