Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/11/2015, 12:39
mandingo69
 
Fecha de Ingreso: octubre-2015
Mensajes: 12
Antigüedad: 8 años, 6 meses
Puntos: 0
Exclamación No me encuentra el metodo Fatal error: Call to undefined function jugarPartida() in

Fatal error: Call to undefined function jugarPartida() in C:\wamp\www\PracticaPHP\index.php on line 24

Este es el codigo, ya nose como arreglarlo!

Cita:
<?php
//include the required files
include('partida.php');
include('colgado.php');

//this will keep the game data as they refresh the page
session_start();

//if they haven't started a game yet let's load one
if (!$_SESSION['partida']['colgado']){
$_SESSION['partida']['colgado'] = new colgado();
}
?>
<html>
<head>
<title>Colgado</title>

</head>
<body>
<div id="content">
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
<h2>Juguemos al Colgado!</h2>
<?php
$_SESSION['partida']['colgado'] = jugarPartida(isset($_POST));
?>
</form>
</div>
</body>
</html>

Cita:
function jugarPartida($letra){

if (isset($_POST['nuevaPartida']) || empty($this->listaPalabras)){
$this->nuevaPartida();
}

if ((!$this->hasPerdido()) && isset($_POST['letra'])){
echo $this->letrasAdivinadas(isset($_POST['letra']));
}

$this->mostrarJuego();
}
Gracias!