Gravi's Forum Posts

  • if i have 1000+ words as in spanish

    in the global variable

    SpanishWord = tres niños

    so i want to replace special letters and set as "tres ninos"

    i try script

    // Retrieve the value from the global variable 'SpanishWord'

    var text = runtime.getGlobalVariable("SpanishWord").getValue();

    // Define character mappings for conversion

    var charMap = {

    'í': 'i',

    'á': 'a',

    'é': 'e',

    'ó': 'o',

    'ú': 'u',

    'ñ': 'n',

    // Add other mappings as needed

    };

    // Function to replace characters based on the map

    function convertText(text) {

    return text.replace(/[íáéóúñ]/g, function(match) {

    return charMap[match] || match;

    });

    }

    // Convert the text

    var convertedText = convertText(text);

    // Set the converted text into the global variable 'spash'

    runtime.getGlobalVariable("spash").setValue(convertedText);

    but getting error

    please guide me right ans..

  • thanx bro

  • SpanishTextDisplayed without capitalization, punctuation, or special

    letter (á == a, é == e, í == i, ó == o, ú == u, ü == u, ñ ==n):

  • You do not have permission to view this post

  • Build failed

  • im trying to set values once time only

    but when i switch layout to another , trigger once start again

    how can i stop

    i want to set only once time when open game

    suggest me correct events

  • If i have panel added image points 2

    image point 1 and 2

    so i need to compare

    if panel image point 2

    is overlapping window > panel image point 2 set to position window

  • You do not have permission to view this post

  • thanks for suggesting

    hey Bro,

    i set image in loading logo

    But its looking circle

    but my image is in square

    Also i check other options like

    Splash Screen and foreground background

    but comes in a circle

  • i make a layout as name Loader layout

    and added image to show as loading screen

    and set properties as shown in image

    But When project launch , app shown 1st loading icon after that app gone to loader layout

    so i want to make

    when app launch show loader layout not icon

    how to make it guide me....

    Tagged:

  • Using browser addon you can check internet connectivity

  • Is this correct

    i tried but

    return value 0

    Tagged:

  • do you have c3p file ?

  • you won bro

    and i got it...

  • i changed the php script

    now no any error and browser console and data submitted successfully from c3 project

    but not reflecting in sql table

    table name - users

    name and score

    <?php

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

    header("Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS");

    header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");

    // Database connection details

    $db = "id22078763_store"; // Your database name

    $dbu = "id22078763_db"; // Your database username

    $dbp = "Db@user5"; // Your database users' password

    $host = "localhost"; // MySQL server - usually localhost

    // Connect to the database

    $dblink = mysqli_connect($host, $dbu, $dbp, $db);

    // Check the connection

    if (!$dblink) {

    die("Connection failed: " . mysqli_connect_error());

    }

    if (isset($_GET['name']) && isset($_GET['score'])) {

    // Lightly sanitize the GET parameters

    $name = mysqli_real_escape_string($dblink, $_GET['name']);

    $score = mysqli_real_escape_string($dblink, $_GET['score']);

    // Insert the score into the database

    $sql = "INSERT INTO `users` (`name`, `score`) VALUES ('$name', '$score')";

    if (mysqli_query($dblink, $sql)) {

    echo 'Your score was saved. Congrats!';

    } else {

    // Log or echo the error message if the query fails

    echo 'There was a problem saving your score. Please try again later. Error: ' . mysqli_error($dblink);

    }

    } else {

    echo 'Your name or score was not passed in the request. Make sure you add ?name=NAME_HERE&score=1337 to the URL.';

    }

    // Close the MySQL connection

    mysqli_close($dblink);

    ?>

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads