Construct 2 connection problem with server via AJAX and XML

Asked

Viewed 235 times

0

Good evening , I’m a beginner in the game creation part , and I’m trying to learn how to create communication between the game and the server , however , using Construct 2 , I’m having problems , because it seems that the game is not looking for information on the server .

Esta é a parte de Eventsheet do Construct 2

    <?php

header('Access-Control-Allow-Origin: *');

echo '<?xml version="1.0" encoding="UTF-8" ?>';
echo '<root>';
echo '<Pergunta id="Pergunta"> Quem nasceu primeiro ? </Pergunta>';
echo '<Pergunta id="RespostaA"> O Ovo </Pergunta>';
echo '<Pergunta id="RespostaB"> A Galinha </Pergunta>';
echo '<Pergunta id="RespostaC"> Os Dinossauros </Pergunta>';
echo '<Pergunta id="RespostaD"> A minha Avó  </Pergunta>';
echo '</root>';

?>

The above code is the php code, in which it should search the server and transmit in the game .

This type of game I’m doing via a video from youtube , however , in his video class worked , I repeated it about 3 times , and decided to ask for help here . I ask for your help, because I look forward to fixing this mistake . Thank you. This is the channel : desKompliKa Cursos

  • 1

    Hi, Bruno, welcome to the site. Please put the code instead of the code image, it’s just [Edit] the question to modify this.

  • @That’s the way it is now ?

  • This question is two years old already, the problem is that @Brunolemos didn’t give us any details about what mistake you made, or if there was a mistake. It would be easier with the code and not with the image, but the Construct2 interface may not help. Most likely the problem is in XML formatting, but I could be wrong. We need the answer from Ajax to see what happens.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.