Copy-Paste Crash and Corruption...

Rimrook

  • Posts: 251
I had written a nice little bit of code in one of my games. It was in the drawing stuff and I don't know how important the details are. The code consisted of a 2 list attributes and a lot of line drawing. The end effect was to make a vector trail for a sprite (very cool effect, works awesomely!) Then I thought that I could attach this code to an actor in a different game of mine. This is where things get screwy...

So I copied the code (right click -> copy) and closed the game and opened up the other one. I paste the code right where it goes like before. I check everything and make sure the attributes are good. I run the game and it never compiles and runs. After a while it errors on me saying every single script in the game has a syntax error, then attempts to open all of the scripts to show me and overloads. I reload stencyl and try it again, only now stencyl completely freezes and crashes.

I open up the backup copy of my game and run it just fine without a flaw. I save my backup again as backup2 and replicate the scenario. It does the exact same thing and exhibit the same errors and crashing. I recreated the effect from scratch on the non-corrupt backup version and it ran without error so its not the code itself.

It must be something that happens when copying and pasting code from project to project.
So the moral of the story, just don't do it. Export things instead.