Funny bug that can occur when making large project watch out

    You're saying the save action sometimes changes the value of a global variable? The thing is logically that's not possible since the save action shouldn't modify anything, and if it did it should be reliably happening. But that's just based on my experience.

    Let's take a step back though. The two possibilities is the issue is either with C2 or with your events.

    You can absolutely check if C2 is to blame by setting some text with that variable right after like this:

    set text to globalvar

    save

    set text to self.text&" "&globalvar

    If the two values ever differ then C2 is to blame and I'd hope a bug report could be made so Scirra could fix it.

    If they're always the same then the issue is elsewhere in your logic. This would be a case where it would be nice if the debugger let you step through events more. Regardless you can also do text debugging like above, the browser log action is also useful instead of just text objects. Basically find all the places that set that variable in the event sheet and log it. Then when you run your game and you see the variable change you can pause and look in the log. You can even save the event number in the log text like so to know what event is changing it.

    browser log "event 10: set global to "&globalvar

    Anyways that's just some ideas into hunting down the cause.

    Well yeah, that is the point that had to be made, and i tried. Hunting down the cause. What is mentioned here i not a little small issue. It is very much disturbing, well, scary even. I tried to take that parcour. I need reassurance. Or be able to wave it away as a breeze in the morning. So far, nothing in here helps me to decide.

    As long as no one posts code that shows the issue in a consistent manner and investigates this code, this topic still makes no sense.

    PixelPower you can feel bullied by that simple statement, but it is common sense.

    If you encounter an issue POST YOUR PROJECT !

    That's the best way to get help from others to debug the project, since you don't seem to be willing to do it yourself.

    Making vague descriptions ("I click my save button" => What is the code behind your save button ? How many variable are there in your project ? What exactly are you saving ? At what moment ? Are there interacting events that may change values at that moment ? etc...) does not help anyone, and making statements that "this is a bug in Construct 2" is just unjustified. In 99.9 % of the cases, it is a user error, meaning an error in the code/events the user produced.

    Construct is just executing those events as it should and the user is stunned because he thought something would happen, and actually something else happens.

    Yet, this is not a Construct 2 bug.

    Other people than myself stated the same thing in different manners in that topic. But yes, I must be bullying.

    And you were the one who "pinged" me in a different topic, about a different issue which can lead to believe I have said things I haven't.

    So who bullied who here ?

    I don't understand what you are experiencing. I am trying, but your explaination is not very clear.

    It seems another user, 99Instances2Go can reproduce it. What did you do to do so, do you have the capx?

    Kyatric is being funny at this point I already told him that the project couldn't be posted because it was a game I was working on and just released a day ago on android. . So I would be dumb to release the capx file for someone to steal my work.

    Let me lay the steps again .

    1) I go to save my project in Construct 2 by clicking the save button located in the top left corner its a file symbol.

    2) After I press the save project button, the global variable GameSave changes in the event sheet on its own to another global variable.

    Thats it is very simple. I see the moderators have no problem trying to make users seem stupid.

    </br>

    This is the 1st time I posted about a bug after being on Construct2 for a year and somehow Kyatric thinks Iam some idiot just stating non-sense. The fact is you jumped in trying to make someone look stupid and now you don't even know what to say. 1st you say you understand but what Iam saying is impossible. Now you say you don't understand what I said. Which one is it?

    Here are 2 photos to show what happened I click save project and then my global variable changed on its own. So I had to uninstall Construct2 and reinstall it. I haven't worked back on my project again except for exporting it to android. Now since its gotten

    1)

    2)

    Oh, it changes when you save your project. The op sounded like it happened when using the save action in events when the game is running.

    I've never encountered this, but I think it would be useful to report as a bug even without a capx.

    Finally, after three pages you finally post specific code.

    And indeed like R0j0hound, from your previous' posts descriptions I thought you were having troubles in the execution of events using local storage, which was the reason your whole topic did not make sense.

    Stop posting you as a victim, I asked for code and clearer description all along in order to investigate your issue which you failed to provide because you preferred moaning, whining and complaining instead of providing clear details about your issue. My goal all along is to investigate, yours is to complain.

    Maybe it is not your intent, but for people understanding English that is what comes out of this topic.

    Unlike what you believe I understood you "couldn't" provide your project's code but you failed to reproduce the issue in a newer capx you could have posted. That's what long time users do in these forums.

    Hence why for three pages I asked for some visuals on your project AND FINALLY when you provide some your issue seems to make a bit more sense.

    Do you make backup copies of your capx ? Do they display the same issue ?

    Do you save on a local hard drive ? A virtual hard drive ? Have you left enough time for your last save or did you close Construct before the actual save was over ?

    Such mess-ups have been observed when users try to save capx on virtual drives (dropbox) and don't let actual time for the save to completely perform.

    Solution: over your development save new instances of capx, don't stay over a single one.

    If you have made it clearer you were talking about a switch of variables within the editor, we would have avoided this uncomfortable situation.

    I "came at you" for lack of details in your explanations and you prove me right.

    Oh, it changes when you save your project. The op sounded like it happened when using the save action in events when the game is running.

    I've never encountered this, but I think it would be useful to report as a bug even without a capx.

    I have read about those things a lot. I said 'things', i did not use the word 'bug'.

    The latest person who was stuck with this, you find here:

    So, that is a known issue.

    I again i want to state that this is not a bug. It just happens that you corrupt the local store because you try and error on it to much while developping the game. Or, you get things differend then you have set them in the next version of the code. An 'if exist' does not know if its a string or a integer, by example. This wil not reach out, because every user will start with a fresh Local Storage. Althaught i think that you have to be carefull when you upgrade a game. Again, this a result of a coding style, and not beeing carefull.

    And yes, i interpreted the op as about the local storage. Now i know it is not, i can move on.

    Kyatric statements like this

    ""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"."

    is what causes problems, you went in being a smart-a$$ instead of looking to help. You started a fight in the forum when your supposed to defuse them. Also your talking as if I complain all the time when I haven't posted any bugs in over a year. I have seen you do it before belittle people and try to diss them.

    </br>

    How on earth is Construct2 going to grow , if you do that to a new member they will just leave and never come back. That why this section is busy but all the other sections are not as busy, they come here, get demoralized then never come back.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    I'd say it's either something weird on your system, bad hd, etc, or you clicked the wrong button.

    I right click an event to copy, and it disappears.

    Happens all the time.

    Cause I hit cut instead.

    The project isn't that big. Remove any third party plugs, and if you can replicate it send a private copy to Scirra, and make a bug report.

    Pro tip: And grow a thicker skin.

    I'd say it's either something weird on your system, bad hd, etc, or you clicked the wrong button.

    I right click an event to copy, and it disappears.

    Happens all the time.

    Cause I hit cut instead.

    The project isn't that big. Remove any third party plugs, and if you can replicate it send a private copy to Scirra, and make a bug report.

    Pro tip: And grow a thicker skin.

    Yeah its was a random bug I posted so other people who might have experienced it won't go crazy. It bugged me out since I was near the end of completing my game when it happened. Thick skin, my skin is fine but if someone comes at me then I come back. The Moderator wanted to go one on one with THE GREAT ONE!! Just kidding about that last part haha.

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

    I was quoting your own post. You mentioned random issue and I ask you to post your project so that other people can confirm.

    What does it say about you other then you are paranoid ?

    You believe it to be smart-ass when it is actual stuff I do on a daily basis for more than 5 years now.

    And since you are new to these parts, you are discovering it.

    To keep referencing The Rock, you should know your role and shut your mouth little Jabroni. You got your candy a** smacked down.

    • See I'm funny as well, am I not ?

    [quote:1os3dsdh]How on earth is Construct2 going to grow , if you do that to a new member they will just leave and never come back. That why this section is busy but all the other sections are not as busy, they come here, get demoralized then never come back.

    For five years I've been providing support and answers to "demoralized new comers". Has it amped down C2's growth ? I don't think so.

    Again, welcome new comer, here's my list of lists to post only that and you can go and read my 6660+ posts to see if they are all just demoralizing and what percentage of them actually deal with trolls and other not-that-smart people which is the only part of them you seem to have read and referenced in this topic.

    Kyatric statements like this

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

    Right, makes sense.

    There you go again you post the part you want to post but not the part that started the back and forth. This was your statement that started the whole back and forth. You don't want to admit you were being a smart-a$$. Basically its like the old saying mess with the bull, get the horns. I only respond to people the way they respond to me. Had you not said

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

    Right, makes sense.

    No of this would have happened. Ok speaking on helping people what happened here?

    You couldn't understand the issue, good thing I came in to save the day haha its a bird, its a plane, no its Super Pixel Power to help when Kyatric can't LOL!!!

    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.

    If you use the "Save / Load" system actions then this is normal.

    So if you load a save game, you also load the values of the variables at the moment the game was saved. And that could lead to such an issue.

    Even if it's easy to use, the Save and Load function caused more problems than it solves (at least in my games).

    Regards

    Andy

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