Hello,
Well another pb today that hurts my time:
I've got in game.php:
And I try to log playername in js file:
And Console give me 'UNDEFINED' for pname.... I don't understand why... is it that the string is not well formated and seems to be null string?
If I replace by colorId, I have the colorId well displayed ('ORA' for example)...
Somebody could explain to me what's wrong, and how I can solve this... I spend to much time for this... thnaks in advance.
Well another pb today that hurts my time:
I've got in game.php:
Code: Select all
$sql = "SELECT player_id id, player_name name, player_color color,player_colorid colorid, player_score score FROM player ";
$result['players'] = self::getCollectionFromDb( $sql );
Code: Select all
for( var player_id in gamedatas.players )
{
var player = gamedatas.players[player_id];
var pname= gamedatas.players['name'];
var colorId = player['colorid'];
var player_board_div = $('player_board_'+player_id);
console.log('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!:'+pname);
If I replace by colorId, I have the colorId well displayed ('ORA' for example)...
Somebody could explain to me what's wrong, and how I can solve this... I spend to much time for this... thnaks in advance.