Funny bug that can occur when making large project watch out

0 favourites
From the Asset Store
Make your own platformer for both the web and mobile easy with this Santas Platformer Template, FULLY DOCUMENTED

    Currently I'am working on a semi-large project and of course use save features to store information. The save feature basically saves the game whenever you beat a mission and it unlocks access to the next level. To make my life easier I have a global variable that is linked to a localstorage key. Both are linked to each sprite that represents my level selection menu.

    </br>

    Now for the bug in Construct2 that randomly occurs. I put the code in to each sprite that if the global variable = a certain amount that sprite changes animation, plus its unlocked. For some odd reason Construct2 changes my global variable code randomly to another global variable, so when I run the game the next level is not unlocked. At 1st I thought it was me but now its happened right in front of my face. I save the game and the code changes right after I saved. 1st time I saw it I was like what the fack LOL.

    </br>

    So if your save keys and variable somehow don't work, check over your code real quick before going nuts. It doesn't happen all the time but when making a large project it will start to happen, at least with me it does.

    Hey Pixel,

    I have worked on a lot of large projects and haven't run into this before. I am inclined to think that it is a problem with your code but you might be right. If you are sure you should definitely lodge a bug report.

    What I normally do when I run into something that 'should' be working but isn't is to place stops in your connecting events so you can inspect what all the variables are at each point. So if you have an event that handles saving or loading, disable your function call or whatever style you use to link events and see if it is consistent.

    Hey Pixel,

    I have worked on a lot of large projects and haven't run into this before. I am inclined to think that it is a problem with your code but you might be right. If you are sure you should definitely lodge a bug report.

    What I normally do when I run into something that 'should' be working but isn't is to place stops in your connecting events so you can inspect what all the variables are at each point. So if you have an event that handles saving or loading, disable your function call or whatever style you use to link events and see if it is consistent.

    Thanks GG it was a wierd bug and I never seen it before. But it happened right in front of me so thats how I knew it wasn't me. I just posted this just in case someone else encounters their save variable changing when they save, so they don't go nuts. I know when I was a beginner I would go crazy just to find out it was something simple. Now that Iam experience I don't go crazy , I slow down so that I can double check everything.

    I just posted this just in case someone else encounters their save variable changing when they save, so they don't go nuts. I know when I was a beginner I would go crazy just to find out it was something simple. Now that Iam experience I don't go crazy , I slow down so that I can double check everything.

    "double check everything" but assumes that Construct "magically" changes values.

    Right, makes sense.

    Consider posting your project so other pair of eyes can investigate and see if they also "encounter the random issue".

    > I just posted this just in case someone else encounters their save variable changing when they save, so they don't go nuts. I know when I was a beginner I would go crazy just to find out it was something simple. Now that Iam experience I don't go crazy , I slow down so that I can double check everything.

    >

    "double check everything" but assumes that Construct "magically" changes values.

    Right, makes sense.

    Consider posting your project so other pair of eyes can investigate and see if they also "encounter the random issue".

    Ok so after all this time on Construct2 you think I just all of a sudden make something up? I didn't post my project because its the game I just released for android. I would be very dumb to post that project for someone to steal it and post it themselves on googleplay after I spent time making it.

    So thats in response to your "smart" statement.

    Of course, it would be dumb to post a proof, but just having to take your "long time expert veteran" word for it is good enough.

    I don't doubt you are encountering an issue. But your assumption that it is a magical Construct 2 bug rather then something not coherent in your code is what bugs me.

    I have been using C2 for the double of your lengthy experience, and I still prefer to think that my code is at fault when encountering an issue.

    And guess what, in most case it is. And when it is indeed a Construct failure, I do make a bug report, following the report guidelines to make sure.

    But your advice here is "don't doubt your code, blame a magical bug and do nothing about it".

    By doubting your code that's how you get even further in depth into C2 and go from the intermediate user that you are to the expert that I dare to say I am.

    And if it is actually really a C2 bug, it would help every one to have it fixed and so to provide some code for it.

    At worst you can post your code "privately" to Scirra directly. But tbh, it is more likely there is an issue in your events then a bug with the local storage that worked now for years...

    Kyatric

    </br>

    1) Press button to save project 2) My variable was GameSave and the moment I pressed the button it changed to the Health variable. I was looking at it with my own eyes.

    The reason I don't post bug report but in the forum is to see if it happened to anyone else. If not I will just uninstall Construct2 and then reinstall it again because maybe it got downloaded wrong and there is a random bug that normally isn't there. Unlike what you did jumping the gun and basically trying to bully me , I posted and waited to see if anyone has encountered the bug. I don't go posting bug reports everytime something goes wrong. Actually I never posted a bug report. If my problem isn't solved, I just unistall Construct2 and go to a version that didn't have problems. Its you who jumped the gun , not me.

    As for banning me from the forums, which you mentioned in the other thread, Iam not the one going to get hurt by it. I actually go to other forums and tell them about Construct2 so Iam not the one losing out.

    But what not going to happen is a moderator feels like he is going to bully and make fun of someone and think I'am a pushover. There was no reason for you to come in with slick comments, I just responded how you came at me.

    I am supposed to be the harsh one in here. Plz dont steal that status from me. Thank you verry much.

    Pixel, just a question. Could it be possible that you (in the previous version of your code) stored things in a differend way (differend then the current version) ?

    I had big problems whit that. I code a lot with trial and error. Now, when i use local storage, i have a 'clear local storage' mapped under a key. Call it a emergency key. And that works fine for me.

    I am supposed to be the harsh one in here. Plz dont steal that status from me. Thank you verry much.

    Pixel, just a question. Could it be possible that you (in the previous version of your code) stored things in a differend way (differend then the current version) ?

    I had big problems whit that. I code a lot with trial and error. Now, when i use local storage, i have a 'clear local storage' mapped under a key. Call it a emergency key. And that works fine for me.

    No I just pressed the save button to save the project and my global variable changed in my code block. At 1st I thought I was seeing things, I was like what the fack. But then it happened again I was like ok now I know what I saw.So I came to the forums to see if anyone else had the issue and no one else had it then I just uninstall and reinstalled Construct2. I come back to the forums and then a Moderator see's fit to make fun of me and try to bully me tying to be funny but it was a bad joke. Then I responded an eye for an eye. Thats what happened.

    I had that issue, under the circumstances as discribed.

    *** i rest my case ***

    I had that issue, under the circumstances as discribed.

    *** i rest my case ***

    Cool so I guess that makes both of us crazy according to the moderator. All of a sudden we became idiots and starting butchering our own code.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    Well you still haven't given any proof. How else would you expect them to reply?

    You started with a somewhat inflammatory title to begin with I might add.

    They rely heavily on the forum to promote the software, so obviously they will rigorously give out smacks to anyone making unproven claims.

    Well you still haven't given any proof. How else would you expect them to reply?

    You started with a somewhat inflammatory title to begin with I might add.

    They rely heavily on the forum to promote the software, so obviously they will rigorously give out smacks to anyone making unproven claims.

    I can tell you didn't even read what I wrote and just jumped in, just like the moderator did. So thats basically the problem.

    Did you understand mine?

    Make a freaking repeatable example project and post it.

    Don't make claims you think are tips in the how do I section.

    Make bug reports in the bug reports.

    That's how this works.

    Kyatric

    1) Press button to save project 2) My variable was GameSave and the moment I pressed the button it changed to the Health variable. I was looking at it with my own eyes.

    Why would you automatically assume this is a C2 engine error and not an events error? Have you cut down your project and debugged it to try and see if it could be a problem with your logic somewhere?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)