headfizz's Recent Forum Activity

  • Hi Fengist,

    So r416 has broken my PHP for updating a CSV file through C3/AJAX/PHP on my server.

    Did the pre_flight() function you posted here solve your issue? Did you have to do anything to your server to get it to work?

    I would really appreciate any guidance here. I'm a bit lost when it comes to changing server settings, etc.

    I've had to revert back to r407.2 until I can get this sorted :(

    And for those wondering how this preflight check works, here's the PHP code I used. If this is called pretty early in your code, it'll keep the overhead lower. In wordpress I hooked it into the init.

    > public function pre_flight() {
    	// Allow requests from any origin
    	 header("Access-Control-Allow-Origin: *");
    	// Handle preflight (OPTIONS) request
    	if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
    		// Specify the allowed headers
    		header("Access-Control-Allow-Methods: POST, GET, OPTIONS");
    		header("Access-Control-Allow-Headers: Content-Type, Authorization");
    		// Set the content type for all responses
    		header("Content-Type: text/plain");
    		// Send a 200 response for preflight checks
    		http_response_code(200);
    		exit;
    	}
    }
    
  • Here you go:

    https://www.dropbox.com/scl/fi/ywt047rfsqr0mql08ej3w/Filter-Array-into-Another-Array-by-String-Search2.c3p?rlkey=chce49xa8n9461nplab0op6jp&st=b3yz4syi&dl=0

    Keep in mind that your records are actually stored on Y axis. And columns on X.

    "Array For Each XY" loop goes through X axis first, that's why I suggest using system loops instead.

    Aww you legend! Thanks so much. Really clever way of doing it - Copying the database and then removing the rows that don't match. Great stuff.

    Can't tell you how much I appreciate it. Would love to repay the favour! If there's anywhere you have a "buy me a coffee" fund or a patreon or something, let me know! :)

    Thanks so much again.

    James

  • Hi everyone!

    I am looking for a little help to figure something out relating to searching and filtering array entries/rows.

    I am looking to be able to search an entire 'Main Data' array for a string and then populate another 'Filtered' array with any rows that contain that searched for string.

    I've tried a few things now, with For Loops, etc but I'm not having any luck!

    I feel like this might be a simple task but I'm over complicating it!

    Here is a template workfile drive.google.com/file/d/10gsbi5FPm8WrbG1KX_bn49hkNxKNiKo7/view

    I made with commented code to show you what I am trying to achieve.

    Here are some visuals to better explain it too:

    drive.google.com/file/d/16k6JyB0YNUsf0kkR5AlXmlRK2Guy2pMD/view

    drive.google.com/file/d/1BZcwvRd4wxQ8tzUpinuXO62a0KExARY2/view

    I would really appreciate it if anyone could offer some advice on this. It actually has me stumped!

    I can't move forward with a project until I get this sorted too.

    All the very best,

    James

  • Thanks so much R0J0hound! Really appreciate the awesome reply. This is spot on, exactly the sort of thing i was looking for. I'm going to be building most of the functionality around it with GUI so the 3d stuff only needs to be basic enough.

    Thanks again R0J0hound - total hero!!

  • Hey folks!

    I am looking to be able to orbit a 3D camera around an object/s (or focus point), using the mouse. Ideally with a smooth camera motion.

    I've had a good look and play around but I haven't been able to crack it!

    I'm wondering if anyone would know how to go about this?

    https://carvisualizer.plus360degrees.com/threejs/ is a good example of the kind of camera movement I need.

    Is this possible in c3?

    Thanks a million for any help!

    All the best,

    James

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I got it working :)

    It seems to be minify script o.0 I've always had that on but it seems to be stopping the game from loading now. So I turned it off and it's fine now.

  • That's good to know. I have no idea what events are causing it though.

    I'm trying everything you said now (just exporting now!).

    I'm using a loader layout (I've successfully used this one in the past) so maybe I'll just try the default c3 one next to see if that works.

    Thanks again, I really do appreciate it :)

  • Thanks for your reply.

    I'm using r157, latest stable, with desktop version 'June 13th 2019: updated to Chrome 75 (NW.js 0.39.0)'.

    I'm going to try and export from the browser version of C3 now.

    I'm hesitant to post on github as I can't publicly post a .c3p (I'm under an NDA).

    Thanks for your guide, I'll go through it if it doesn't work from the browser version.

  • Thanks man. I'll post there as well. I have a deadline for today and I'm pulling my hair out right now :(

  • In firefox it just says : TypeError: e.g_Oh is undefined

  • Hello.

    When I preview the game it works fine but when I export and then upload to my server it just shows a black screen and says the following in the chrome dev console:

    Uncaught (in promise) TypeError: Cannot read property 'exports' of undefined at g_aQ.g_Gh.g_aGb.Instance.g__j (c3runtime.js:2) at async Promise.all (/arone/index 4) at async g_aQ.g_ajV.g_ae_ (c3runtime.js:2) at async o.g_aOh (main.js:1) at async o.g__j (main.js:1) g__j @ c3runtime.js:2 async function (async) g__j @ main.js:1 o @ main.js:1 (anonymous) @ main.js:1

    Would really appreciate some help here. I'm not using any plugins or addons.

    Edit: I'm using latest version of C3 (latest desktop) with c3 runtime (no worker)

    I'm getting this prnt.sc/kby81y UI glitch happen when I open Settings while I have the xml editor in use. After this I can't click on anything and had to reopen.

    It also keeps saying I need to update to r111 when I open it, even though I have and it says it's on r111.

headfizz's avatar

headfizz

Member since 26 Aug, 2013

None one is following headfizz yet!

Connect with headfizz

Trophy Case

  • 11-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

13/44
How to earn trophies