From de49c375acbd7c47dcd07f97a5fbd55c5348d39c Mon Sep 17 00:00:00 2001 From: gnieark Date: Sun, 29 Jan 2017 23:34:44 +0100 Subject: [PATCH] better translation, alert javascrpt if a bot is on error --- html/testBotScripts/connectfour.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/html/testBotScripts/connectfour.html b/html/testBotScripts/connectfour.html index e9c0db4..d88ace0 100755 --- a/html/testBotScripts/connectfour.html +++ b/html/testBotScripts/connectfour.html @@ -247,10 +247,11 @@ function play(player){ addLog('His rsponse is:' + xhr.responseText); playingAT(colTarget); }else{ - addLog ('bot response must be a digit betwin 0 and 7, witch indicate the conumn number where he wants play. Voici sa réponse: "' + colTarget + '"' ); + addLog ('bot response must be a digit betwin 0 and 7, witch indicate the conumn number where he wants play. His response his: "' + colTarget + '"' ); } - }else{ - addLog('le bot ' + player + ' does not respond. ' + xhr.status); + }else{ + alert ('Bot ' + player + ' replied with an error code: ' + xhr.status + ' ' + xhr.responseText); + addLog('Bot ' + player + ' replied with an error code: ' + xhr.status + ' ' + xhr.responseText); return; } }else{