Odin's Forum Posts

  • yeah remove the single qoutes in the data entry.

    Resulting in : "distanceTotal="&distanciaTotal

    To add more

    "distanceTotal="&distanciaTotal&"&playerID="&SomeConstruct2Var

    Result would look like

    "distanceTotal=100&playerID=10"

    Hello again, first of all so many thanks you !!

    It seems I can connect properly to send data to mysql db, my problem now is that I can't acces to data from the db!! My problem now is in the loging.

    My construct call is this:

    "http://myweb.com/myproject/php/login.php?nombreUsuario=" & nombreUsuario & "&passUsuario=" & passUsuario[/code:3tqmklo3]
    
    An this is my php wich is actually working properly (i tested it):
    
    [code:3tqmklo3]<?php
    	// Variables 
    	$nombreUsuario = $_GET['nombreUsuario'];
    	$passUsuario = $_GET['passUsuario'];
    	
    	$con=mysqli_connect("blebleble","bliblibli","blobloblo","blublublu");
    	// Check connection
    	if (mysqli_connect_errno())
    	{
    	 echo "Failed to connect to MySQL: " . mysqli_connect_error();
    	 }
    	$qz = "SELECT idUsuario FROM usuarios_aep where nombreUsuario='".$nombreUsuario."' and passUsuario='".$passUsuario."'" ;
    	$qz = str_replace("\'","",$qz);
    	$result = mysqli_query($con,$qz);
    	
    	if ($result->num_rows > 0) {
    		while($row = $result->fetch_assoc()){
    			echo $row["idUsuario"];
    		}
    	} else {
    		echo "Error al acceder a los datos: " . mysqli_error($con);
    	}
    	mysqli_close($con);
    ?>[/code:3tqmklo3]
    
    I try to get as data "idUsuario" and I save this id in a variable, but when I run my project in debug mode the content of that variable is NaN (not a Number). I'm not sure what is happening, any idea??
    
    thanks.
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • After connecting, and after you have done the INSERT query, with your current approach with using a Ajax GET request, the following should work.

    [quote:2jh1h120]$query =("UPDATE usuarios_aep SET distanciaTotal = '".$distanciaTotal."' WHERE nombreUsuario = '".$_GET['nombreUsuario']."' AND passUsuario = '".$_GET['passUsuario']."' ");

    $mysqli->query($query);

    I would suggest switching to post methods, otherwise it would become very easy to cheat

    I come back with more problems!!

    Actually I have this php in my server, I tested it from chrome and it works, makes the UPDATE correctly.

    <?php
    	// Variables 
    	$nombreUsuario = "XXuser";
    	$passUsuario = "XXpass";
    	$distanciaTotal = $_GET['distanciaTotal'];
    	
    	$con=mysqli_connect("blablabla.com","blebleble","bliblibli","blublublu");
    	// Check connection
    	if (mysqli_connect_errno())
    	{
    	 echo "Failed to connect to MySQL: " . mysqli_connect_error();
    	 }
    	$qz =("UPDATE usuarios_aep SET distanciaTotal = '".$distanciaTotal."' 
    				WHERE nombreUsuario = '".$nombreUsuario."' 
    				AND passUsuario = '".$passUsuario."' 
    			");
    			
    	if (mysqli_query($con, $qz)) {
    		echo "Record updated successfully";
    	} else {
    		echo "Error updating record: " . mysqli_error($con);
    	}
    	mysqli_close($con);
    ?>[/code:2jh1h120]
    
    The problem appears when c2 has send (POST or GET method) the data to php, it seems that I am not sending data at all...  so I think that the problem is in the next images (the AJAX connection) but I don't know how to solve it.
    [img="http://www.therealgeekgirl.com/server1.jpg"]
    [img="http://www.therealgeekgirl.com/server2.jpg"]
  • I want to save one variable every 10 sec in the user row.

    My php code:

    <?php
    	// Variables 
    	$nombreUsuario = $_GET['nombreUsuario'];
    	$passUsuario = $_GET['passUsuario'];
    	$distanciaTotal = $_GET['distanciaTotal'];
    	
    	$con=mysqli_connect("mysql","database","userid","password");
    	// Check connection
    	if (mysqli_connect_errno())
    	{
    	 echo "Failed to connect to MySQL: " . mysqli_connect_error();
    	 }
    	$query =("INSERT INTO usuarios_aep (distanciaTotal) VALUES (".$distanciaTotal.") 
    					WHERE nombreUsuario like ".$nombreUsuario." 
    					AND passUsuario like ".$passUsuario." 
    				");
    	$mysqli->query($query);
    	
    	mysqli_close($con);
    ?>[/code:tb2wf9on]
    
    event "every 10 sec"
    [code:tb2wf9on]"http://fakefake.com/fakefake/php/insertDistanciaTotal.php?nombreUsuario='"&nombreUsuario&"'&passUsuario='"&passUsuario&"'&distanciaTotal='"&distanciaTotal&"'"[/code:tb2wf9on]
  • I mean set the height size of your image to minus, then rotate it and reposition it.

    This will remove of the black line.

    You was right!

    Thanks a lot.

  • I didn't see any black line when playing the game.

    Try to set the tiledbackground Y size in minus: e.g ( -20)

    This will solve the black line problem.

    Sorry, I can't understand your comment, are you saying I need invert the Y axis of the tiled background?

    That is the line like I can see in a 22" android tablet:

    http://therealgeekgirl.com/img/blackline.jpg

    And this is the 256x256 tiledbackground:

    http://therealgeekgirl.com/img/parallaxline.png

    Can you say me what property I need to change in the panel of the tiled background?

    Thanks

  • Hi everybody, I have a new rare problem I think its easy to solve. I'm doing two runner games with parallax tiled background:

    http://therealgeekgirl.com/torrijos/

    http://therealgeekgirl.com/felipe/

    The problem comes when I export the proyects to Android and appears several lines like 1px black higth in the tiled background (some times at top and other times at bottom of the tile) if you play in a tablet, also the lines can appear in some monitors/resolutions.

    Any solutions?

  • ¡Thanks!

  • Hello everybody

    I have a litle problem playing continuous audio effect, all is perfect if the sound is activated by a click or another momentary instruction, but when the condition is running continuously (like a car running in a road, the rain's effect, etc) the effect begins every tick. I think this has an easy solution in the "play system" but i can't found it.

    Any solution?

    Thanks

  • the problem buddy was that somehow in the ludei compiling screen it default to the latest compiler, with this one the 2.1.1 something will cause this error, for all apps, do it, with the 2.1 compiler and ur apps will run again, but will see for how long.... gut luck

    Solved, I owe you a beer. Te debo una cerveza.

  • Hello everybody,

    I have problems with the coccoon.js exportations since the r.200 upgrade, and I'm not sure if it is a construct2 problem or a Ludei's compilator problem, the games created in the C2 r198 version for Android (4.0 or below) worked perfectly, but now all the games give me this error:

    The application has been stopped

    Accept*

    (*in spanish, not sure how the error should be in english)

    In the Ludei compilator I am using this configuration:

    Android

    Min version: 2.3(Gingerbread)

    Max version: All Versions

    Canvas + Services

    WebGL

    Compile Project

    Canvas +

    Compile version

    2.1.1

    My device is in Android 4.0.4 and I can't use XDK+ Cordova because I can't make it work in this kind of old device without dedicated graphic chip, they work, but so slow and I can't find any configuration to make them work better or faster. For now in that device the games only worked when were compiled with coccoon.js

    Does anyone could export and compile with Ludei cocoon.js with C2 r200 version?

    Thanks

  • Hello,

    We are working on a new extension for Canvas+ for videos. We are currently testing it. In addition, we are working on a new cloud based in cordova in which there is a new Webview+ for android that does support videos. We are planning to open it in beta in the nearly future.

    Regards.

    First of all thanks you for the answer!

    I'm very interested in this feature -playing videos on android- so, is there any way to know where the beta will be launched?

    thanks againg and regards.

  • Hey! I have the same problem in my app. The video can play in win and html but don't work in android:

    https://www.scirra.com/forum/viewtopic.php?f=147&t=125412&p=889806#p889806

  • I tried with mp4/h264, ogv video and webm/VP8 and it works in html and windows, works in online launcher cocoonjs too, but when I try to export for android/cocoonjs the screen keep white after the splash.

  • Hi Everybody!

    I have a little problem with a very simple app for android development.

    I only need to launch a video from a button, but the video doesn't play...... (it only shows a white screen). I have to made this app run in a slow device with 4.0.4 Android version, the videos are at 1080p and aprox 60mb in mp4 and ogv in html video, if i put these videos directly on the tablet, they works with a random player from the play store....

    Any help?

    PS: I'm trying to build tthe app with cocoon.js, in webview+ and if I use the cocoon launcher from a online version it works, but when I build the version I tested, it doesn't work...

  • Have you tried to change Fullscreen in browser to Scale inner?

    One question more, do you know if c2 have a fuction with similar result to this: