asdfghjkot's Forum Posts

  • This is a part of the data that I'm trying to pass...

    {"c2array":true,"size":[46,12,1],"data":[{"ID":"36","avatar":"20","item_id":"1","quantity":"2","icon_position":"0","storage":"1","destroyed":"1","value":"0.04","level_exp":"0","perks":"0","stats":"0","log":"a:4:{i:0;s:48:\"Claimed last: - Thu, 28 Nov 2019 03:25:50 +0000\";i:1;s:48:\"Claimed last: - Thu, 28 Nov 2019 03:26:55 +0000\";i:2;s:48:\"Claimed last: - Thu, 28 Nov 2019 03:29:22 +0000\";i:3;s:60:\"Used for extraction last: - Thu, 28 Nov 2019 03:31:36 +0000\";}"}]}

    I was wondering how can that be like...

    the [object object] be replaced with the values indicated above.

  • The title says it all. Also, here are some pictures to help in solving the problem. Thank you in advance :D

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    Hi. I've been trying to populate a dictionary with rows from a PHP file. The dictionary contains keys, while the value is just [Object object].

    Here's my code:

    function ajax_load_inventory($source = '1',$player_id) { $player_id = 20; // Build query - grab all rows from inventory table that are owned by the player id $sql = "SELECT * FROM inventory WHERE avatar= '".$player_id."'"; // Execute the query and store the result $results = execute_sql($sql,'0'); // Fetch all $row = mysqli_fetch_all($results, MYSQLI_ASSOC); //Output array for c2array use outputAsC2DictionaryJSON($row); } // ends function load_inventory($source = 'inventory',$player_id) { function outputAsC2DictionaryJSON($avatar_inventory) { $data = array( 'c2dictionary' => true, 'data' => $avatar_inventory ); outputData($data); } function outputData($data) { echo json_encode($data); // exit(1); }

    Here's the dictionary...

    Hope someone can help me with this. It would be a big help. Thank you in advance.

    Tagged:

  • Hi. I'm new to construct. How do you install or include this to construct? Thank you in advance

  • Thank you very much!

  • Hi. I'm new and currently studying Construct. Are there any tutorials on how to include PHP in Construct? Thank you in advance!