Multiple compile/build errors

Blacksmith

  • Posts: 142
I'm running 3.1 7305.
The game is working fine and then all of a sudden over five consecutive builds Stencyl gives me a different error (see below). Then the game works, then more errors. Very erratic behaviour. (And re-installing v3.1 didn't resolve it.)


There are no errors in the code that is referred to in the pics. They have been untouched in weeks. (And yes I did check each time just in case.)

Getting generic errors has happened in the past and somehow I got out of it with wasted effort and with no understanding. Forum threads tend to focus on specific coding errors (null actors, missing parameters, etc) than generic and random errors.

I just reinstalled version 3.1 and the problems persists. (This is not a 3.1 issue, it has happened to me periodically all the way back to v2.) I've attached log files just in case.

Have others seen this? Is there anything that causes this, or is it random corruption of some file? Anything to protect against it?
Thanks for your help.

letmethink

  • *
  • Posts: 2545
Are you sure you haven't deleted something that is being referenced accidentally?

Could you show us one of the behaivours so we can see that there isn't anything wrong with them?
~Letmethink

Blacksmith

  • Posts: 142
Thanks for your quick reply.
Are you sure you haven't deleted something that is being referenced accidentally? Could you show us one of the behaivours so we can see that there isn't anything wrong with them?

I'm 99% certain I haven't deleted anything accidentally because every time I compile Stencyl identifies the error in an unrelated "behaviour". It truly is an Unexpected error. e.g. StarMovement is an actor behaviour. Display all Images from Set is a scene behaviour used exclusively in one scene. Traditional 2048... is a scene behaviour also used exclusively in a different scene. And the same with Noah's Ark Selection Screen scene behaviour. The only behaviour used in multiple scenes is BA (but not in any of the scenes already mentioned).

Nevertheless, per request, I've attached the simplest of the behaviours, Star Movement. The behaviour is attached to an actor ( a star or diamond shape) and once it is created, it spins and moves to a predetermined location.

I look forward to additional suggestions.


letmethink

  • *
  • Posts: 2545
This does seem weird. Have you tried looking at any of the code generated and seen whether you can see the errors the program has outlined?
~Letmethink

Blacksmith

  • Posts: 142
Thanks again. I'm not familiar with reading code but I have included it below. The build error says line 94 (highlighted in red), but we all know that errors aren't necessarily at the specified location (or real).

Again, I don't want people to waste their time focusing on the code part. This has happened before, with many projects. The problem usually resolves itself after many, many days of re-installs, cleaning, opening, closing, save as, exporting, etc. All of a sudden the game just starts working again. I'm in day 3 now and am curious if other people have experienced the same circumstances.

Anyway, for sh*ts and giggles, here's the code for the actor behaviour StarMovement (on actor's creation it spins and moves to a pre-determined location).
Thanks

package scripts;
import com.stencyl.graphics.G;
import com.stencyl.behavior.Script;
import com.stencyl.behavior.ActorScript;
import com.stencyl.behavior.SceneScript;
import com.stencyl.behavior.TimedTask;
import com.stencyl.models.Actor;
import com.stencyl.models.GameModel;
import com.stencyl.models.actor.Animation;
import com.stencyl.models.actor.ActorType;
import com.stencyl.models.actor.Collision;
import com.stencyl.models.actor.Group;
import com.stencyl.models.Scene;
import com.stencyl.models.Sound;
import com.stencyl.models.Region;
import com.stencyl.models.Font;
import com.stencyl.Engine;
import com.stencyl.Input;
import com.stencyl.Key;
import com.stencyl.utils.Utils;
import nme.ui.Mouse;
import nme.display.Graphics;
import nme.display.BlendMode;
import nme.display.BitmapData;
import nme.display.Bitmap;
import nme.events.Event;
import nme.events.KeyboardEvent;
import nme.events.TouchEvent;
import nme.net.URLLoader;
import box2D.dynamics.joints.B2Joint;
import motion.Actuate;
import motion.easing.Back;
import motion.easing.Cubic;
import motion.easing.Elastic;
import motion.easing.Expo;
import motion.easing.Linear;
import motion.easing.Quad;
import motion.easing.Quart;
import motion.easing.Quint;
import motion.easing.Sine;
import com.stencyl.graphics.shaders.BasicShader;
import com.stencyl.graphics.shaders.GrayscaleShader;
import com.stencyl.graphics.shaders.SepiaShader;
import com.stencyl.graphics.shaders.InvertShader;
import com.stencyl.graphics.shaders.GrainShader;
import com.stencyl.graphics.shaders.ExternalShader;
import com.stencyl.graphics.shaders.InlineShader;
import com.stencyl.graphics.shaders.BlurShader;
import com.stencyl.graphics.shaders.ScanlineShader;
import com.stencyl.graphics.shaders.CSBShader;
import com.stencyl.graphics.shaders.HueShader;
import com.stencyl.graphics.shaders.TintShader;
import com.stencyl.graphics.shaders.BloomShader;
class Design_129_129_StarMovement extends ActorScript
{
    public var _Yaxistarget:Float;
    public var _yaxis:String;
    public var _xaxis:String;
    public function new(dummy:Int, actor:Actor, engine:Engine)
    {
        super(actor, engine);
        nameMap.set("Y-axis target", "_Yaxistarget");
        _Yaxistarget = 0.0;
        nameMap.set("yaxis", "_yaxis");
        _yaxis = "";
        nameMap.set("xaxis", "_xaxis");
        _xaxis = "";
        nameMap.set("Actor", "actor");
    }
    override public function init()
    {
        /* ======================== When Creating ========================= */
        _yaxis = "0";
        propertyChanged("_yaxis", _yaxis);
        _xaxis = "0";
        propertyChanged("_xaxis", _xaxis);
        actor.growTo(1000/100, 1000/100, 1, Quad.easeInOut);

        if ((actor.getType() == getActorType(280)))
        {
            actor.spinBy(1440, 2, Quad.easeInOut);
        }
        else
        {
            actor.spinBy(720, 2, Quad.easeInOut);
        }

        /* ======================= After N seconds ======================== */
        runLater(1000 * 1.05, function(timeTask:TimedTask):Void
        {

            if (wrapper.enabled)
            {
                actor.applyImpulse((asNumber(_xaxis) - actor.getXCenter()), (asNumber(_yaxis) - actor.getYCenter()), 20);
                actor.growTo(100/100, 100/100, 0.5, Quad.easeInOut);
            }
        }, actor);
        /* ======================== When Updating ========================= */
        addWhenUpdatedListener(null, function(elapsedTime:Float, list:Array<Dynamic>):Void
        {

            if (wrapper.enabled)
            {
                if ((actor.getType() == getActorType(280)))
                {
                    if ((actor.getYCenter() < 147))
                    {
                        actor.setXVelocity(0);
                        actor.setYVelocity(0);
                    }
                }
                else if ((actor.getYCenter() < 131))
                {
                    actor.setXVelocity(0);
                    actor.setYVelocity(0);
                }
            }
        });
    }
    override public function forwardMessage(msg:String)
{}}

letmethink

  • *
  • Posts: 2545
Yeah, I don't see anything wrong with that. Is there anything weird with your setup or your computer naming system. (e.g. where Stencyl is installed).
~Letmethink

Blacksmith

  • Posts: 142
I don't customize anything on my Macbook (2011, 10.9.4) nor in Stencyl 3.1 #7305). When I install Stencyl I drag it to my Applications folder and that's it. i don't have any extensions installed.

Yeah, I don't see anything wrong with that. Is there anything weird with your setup or your computer naming system. (e.g. where Stencyl is installed).

Tuo

  • *
  • Posts: 2469
Have you tried Run -> Clean Project? I've used that to handle these kinds of messes in the past with moderate success.
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)

Blacksmith

  • Posts: 142
Tuo, I tried multiple times and Clean Project has not worked yet. Usually that, a few reinstalls, and some Hail Marys gets it going.  I just wish i understood what was happening.
Thanks.

Have you tried Run -> Clean Project? I've used that to handle these kinds of messes in the past with moderate success.

mvmsaikrishna

  • Posts: 83
this is one common fucking problem. You need to export the game and re-import it.

Blacksmith

  • Posts: 142
I'm not sure if it was just one technique but I got it working again. I kept redoing the following (not always in the same order) until it eventually worked. Closing/opening Stencyl, rebooting, re-installing Stencyl, saving as a different name, exporting/importing, etc.

Thank you all for your help and support.

However, if anyone is knowledgeable about the best specific solutions for this issue...please let us know.