The code for this will be a bit of a large dump, as it's part of a large project, but I simply can't find an explanation or solution for this problem. I'm coding in Java using Stencylworks, and I'm still new to this, so I'm just going to dump the code for the entire class, as I don't really know what might be causing it. (Yes, I will tag the lines the error message refers to within the code)
I would post the error message here, but the system here seems to think that it's code, so I'll just say that the errors are all the quoted message in the title, and that I've tagged the lines that the error message referred to within the posted code below.
And this is the code
package scripts
{
import flash.display.BlendMode;
import flash.events.*;
import flash.net.*;
import flash.filters.*;
import Box2DAS.Collision.*;
import Box2DAS.Collision.Shapes.*;
import Box2DAS.Common.*;
import Box2DAS.Dynamics.*;
import Box2DAS.Dynamics.Contacts.*;
import Box2DAS.Dynamics.Joints.*;
import stencyl.api.data.*;
import stencyl.api.engine.*;
import stencyl.api.engine.actor.*;
import stencyl.api.engine.behavior.*;
import stencyl.api.engine.bg.*;
import stencyl.api.engine.font.*;
import stencyl.api.engine.scene.*;
import stencyl.api.engine.sound.*;
import stencyl.api.engine.tile.*;
import stencyl.api.engine.utils.*;
import org.flixel.*;
import mochi.as3.*;
import flash.ui.Mouse;
public dynamic class Design_51_51_Spawn extends SceneScript
{
public var _PreviousScene1:String;
public var _PreviousScene2:String;
public var _PreviousScene3:String;
public var _PreviousScene4:String;
public var _PreviousScene5:String;
public var _XPositiona:Number;
public var _Ypositiona:Number;
public var _XPositionb:Number;
public var _YPositionb:Number;
public var _Xpositionc:Number;
public var _Ypositionc:Number;
public var _Ypositiond:Number;
public var _Xpositione:Number;
public var _Ypositione:Number;
public var _Xpositiond:Number;
public var _ChangeTrack1:Boolean;
public var _NextTrack:SoundClip;
public var _ChangeTrack2:Boolean;
public var _PreviousScene6:String;
public var _Xpositionf:Number;
public var _Ypositionf:Number;
public var _PreviousScene7:String;
public var _Xpositiong:Number;
public var _Ypositiong:Number;
public var _SpawnLocationa:String;
public var _SpawnLocationB:String;
public var _SpawnLocationc:String;
public var _SpawnLocationd:String;
public var _SpawnLocatione:String;
public var _SpawnLocationf:String;
public var _SpawnLocationg:String;
public var _Playeractor:Actor;
public var _NextScene:Scene;
public var _FadeOutTime:Number;
public var _FadeInTime:Number;
public var _NextSceneName1:String;
public var _Wind1:Number;
public var _Region:Region;
public var _NextScene2:Scene;
public var _NextSceneName2:String;
public var _Wind2:Number;
public var _Region2:Region;
public var _NextScene3:Scene;
public var _NextSceneName3:String;
public var _Wind3:Number;
public var _region3:Region;
public var _NextScene4:Scene;
public var _NextSceneName4:String;
public var _Wind4:Number;
public var _Region4:Region;
public var _NextScene5:Scene;
public var _NextSceneName5:String;
public var _Wind5:Number;
public var _Region5:Region;
override public function init():void
{
setGameAttribute("Respawn", false);
setVolumeForChannel(Number((getGameAttribute("wind"))) /100, 3);
if (sameAs((getGameAttribute("Previous Scene")), _PreviousScene1))
{
if ((getGameAttribute("Returned to beginning")as Boolean))
{
createActor(getActorType(328), (_XPositiona + Number("" + ((getGameAttribute(_SpawnLocationa)) as Array)[0])), (_Ypositiona + Number("" + ((getGameAttribute(_SpawnLocationa)) as Array)[1])), FRONT);
}
else
{
if ((getGameAttribute("33 saved")as Boolean))
{
createActor(getActorType(355), (_XPositiona + Number("" + ((getGameAttribute(_SpawnLocationa)) as Array)[0])), (_Ypositiona + Number("" + ((getGameAttribute(_SpawnLocationa)) as Array)[1])), FRONT);
}
else
{
createActor(getActorType(164), _XPositiona, _Ypositiona, FRONT);
}
}
if (_ChangeTrack1)
{
stopSoundOnChannel(1);
loopSoundOnChannel(_NextTrack, 1);
}
}
if (sameAs((getGameAttribute("Previous Scene")), _PreviousScene2))
{
if ((getGameAttribute("Returned to beginning")as Boolean))
{
createActor(getActorType(328), (_XPositionb + Number("" + ((getGameAttribute(_SpawnLocationB)) as Array)[0])), (_YPositionb + Number("" + ((getGameAttribute(_SpawnLocationB)) as Array)[1])), FRONT);
}
else
{
if ((getGameAttribute("33 saved")as Boolean))
{
createActor(getActorType(355), (_XPositionb + Number("" + ((getGameAttribute(_SpawnLocationB)) as Array)[0])), (_YPositionb + Number("" + ((getGameAttribute(_SpawnLocationB)) as Array)[1])), FRONT);
}
else
{
createActor(getActorType(164), _XPositionb, _YPositionb, FRONT);
}
}
if (_ChangeTrack2)
{
stopSoundOnChannel(1);
loopSoundOnChannel(_NextTrack, 1);
}
}
if (sameAs((getGameAttribute("Previous Scene")), _PreviousScene3))
{
if ((getGameAttribute("Returned to beginning")as Boolean))
{
createActor(getActorType(328), (_Xpositionc + Number("" + ((getGameAttribute(_SpawnLocationc)) as Array)[0])), (_Ypositionc + Number("" + ((getGameAttribute(_SpawnLocationc)) as Array)[1])), FRONT);
}
else
{
if ((getGameAttribute("33 saved")as Boolean))
{
createActor(getActorType(355), (_Xpositionc + Number("" + ((getGameAttribute(_SpawnLocationc)) as Array)[0])), (_Ypositionc + Number("" + ((getGameAttribute(_SpawnLocationc)) as Array)[1])), FRONT);
}
else
{
createActor(getActorType(164), _Xpositionc, _Ypositionc, FRONT);
}
}
}
if (sameAs((getGameAttribute("Previous Scene")), _PreviousScene4))
{
if ((getGameAttribute("Returned to beginning")as Boolean))
{
createActor(getActorType(328), (_Xpositiond + Number("" + ((getGameAttribute(_SpawnLocationd)) as Array)[0])), (_Ypositiond + Number("" + ((getGameAttribute(_SpawnLocationd)) as Array)[1])), FRONT);
}
else
{
if ((getGameAttribute("33 saved")as Boolean))
{
createActor(getActorType(355), (_Xpositiond + Number("" + ((getGameAttribute(_SpawnLocationd)) as Array)[0])), (_Ypositiond + Number("" + ((getGameAttribute(_SpawnLocationd)) as Array)[1])), FRONT);
}
else
{
createActor(getActorType(164), _Xpositiond, _Ypositiond, FRONT);
}
}
}
if (sameAs((getGameAttribute("Previous Scene")), _PreviousScene5))
{
if ((getGameAttribute("Returned to beginning")as Boolean))
{
createActor(getActorType(328), (_Xpositione + Number("" + ((getGameAttribute(_SpawnLocatione)) as Array)[0])), (_Ypositione + Number("" + ((getGameAttribute(_SpawnLocatione)) as Array)[1])), FRONT);
}
else
{
if ((getGameAttribute("33 saved")as Boolean))
{
createActor(getActorType(355), (_Xpositione + Number("" + ((getGameAttribute(_SpawnLocatione)) as Array)[0])), (_Ypositione + Number("" + ((getGameAttribute(_SpawnLocatione)) as Array)[1])), FRONT);
}
else
{
createActor(getActorType(164), _Xpositione, _Ypositione, FRONT);
}
}
}
if (sameAs((getGameAttribute("Previous Scene")), _PreviousScene6))
{
if ((getGameAttribute("Returned to beginning")as Boolean))
{
createActor(getActorType(328), (_Xpositionf + Number("" + ((getGameAttribute(_SpawnLocationf)) as Array)[0])), (_Ypositionf + Number("" + ((getGameAttribute(_SpawnLocationf)) as Array)[1])), FRONT);
}
else
{
if ((getGameAttribute("33 saved")as Boolean))
{
createActor(getActorType(355), (_Xpositionf + Number("" + ((getGameAttribute(_SpawnLocationf)) as Array)[0])), (_Ypositionf + Number("" + ((getGameAttribute(_SpawnLocationf)) as Array)[1])), FRONT);
}
else
{
createActor(getActorType(164), _Xpositionf, _Ypositionf, FRONT);
}
}
}
if (sameAs((getGameAttribute("Previous Scene")), _PreviousScene7))
{
if ((getGameAttribute("Returned to beginning")as Boolean))
{
createActor(getActorType(328), (_Xpositiong + Number("" + ((getGameAttribute(_SpawnLocationg)) as Array)[0])), (_Ypositiong + Number("" + ((getGameAttribute(_SpawnLocationg)) as Array)[1])), FRONT);
}
else
{
if ((getGameAttribute("33 saved")as Boolean))
{
createActor(getActorType(355), (_Xpositiong + Number("" + ((getGameAttribute(_SpawnLocationg)) as Array)[0])), (_Ypositiong + Number("" + ((getGameAttribute(_SpawnLocationg)) as Array)[1])), FRONT);
}
else
{
createActor(getActorType(164), _Xpositiong, _Ypositiong, FRONT);
}
}
}
setGameAttribute("Respawn", false);
setGameAttribute("Re/Spawning", false);
}
override public function update():void
{
if (!(_Playeractor ! = null)) // here
{
_Playeractor = getLastCreatedActor();
print("" + _Playeractor);
}
if (((_Region ! = null && _NextScene ! = null) && !(isTransitioning()))) // here
{
if (isInRegion(_Playeractor, _Region))
{
setGameAttribute("Re/Spawning", true);
switchScene(_NextScene.getID(), createFadeOut(((1000*_FadeOutTime))), createFadeIn(((1000*_FadeInTime))));
setGameAttribute("Previous Scene", _PreviousScene1);
setGameAttribute("Scene", _NextSceneName1);
setGameAttribute("wind", _Wind1);
setGameAttribute("Re/Spawning", false);
}
}
if (((_Region2 ! = null && _NextScene2 ! = null) && !(isTransitioning()))) // here
{
if (isInRegion(_Playeractor, _Region2))
{
setGameAttribute("Re/Spawning", true);
switchScene(_NextScene2.getID(), createFadeOut(((1000*_FadeOutTime))), createFadeIn(((1000*_FadeInTime))));
setGameAttribute("Previous Scene", _PreviousScene2);
setGameAttribute("Scene", _NextSceneName2);
setGameAttribute("wind", _Wind2);
setGameAttribute("Re/Spawning", false);
}
}
if (((_region3 ! = null && _NextScene3 ! = null) && !(isTransitioning()))) // here
{
if (isInRegion(_Playeractor, _region3))
{
setGameAttribute("Re/Spawning", true);
switchScene(_NextScene3.getID(), createFadeOut(((1000*_FadeOutTime))), createFadeIn(((1000*_FadeInTime))));
setGameAttribute("Previous Scene", _PreviousScene3);
setGameAttribute("Scene", _NextSceneName3);
setGameAttribute("wind", _Wind3);
setGameAttribute("Re/Spawning", false);
}
}
if (((_Region4 ! = null && _NextScene4 ! = null) && !(isTransitioning()))) // here
{
if (isInRegion(_Playeractor, _Region4))
{
setGameAttribute("Re/Spawning", true);
switchScene(_NextScene4.getID(), createFadeOut(((1000*_FadeOutTime))), createFadeIn(((1000*_FadeInTime))));
setGameAttribute("Previous Scene", _PreviousScene4);
setGameAttribute("Scene", _NextSceneName4);
setGameAttribute("wind", _Wind4);
setGameAttribute("Re/Spawning", false);
}
}
if (((_Region5 ! = null && _NextScene5 ! = null) && !(isTransitioning()))) // here
{
if (isInRegion(_Playeractor, _Region5))
{
setGameAttribute("Re/Spawning", true);
switchScene(_NextScene5.getID(), createFadeOut(((1000*_FadeOutTime))), createFadeIn(((1000*_FadeInTime))));
setGameAttribute("Previous Scene", _PreviousScene5);
setGameAttribute("Scene", _NextSceneName5);
setGameAttribute("wind", _Wind5);
setGameAttribute("Re/Spawning", false);
}
}
}
override public function draw(g:Graphics, x:Number, y:Number):void
{
}
public function Design_51_51_Spawn(ignore:*, scene:GameState)
{
super(scene);
nameMap["Previous Scene 1"] = "_PreviousScene1";
nameMap["Previous Scene 2"] = "_PreviousScene2";
nameMap["Previous Scene 3"] = "_PreviousScene3";
nameMap["Previous Scene 4"] = "_PreviousScene4";
nameMap["Previous Scene 5"] = "_PreviousScene5";
nameMap["X Position a"] = "_XPositiona";
nameMap["Y position a"] = "_Ypositiona";
nameMap["X Position b"] = "_XPositionb";
nameMap["Y Position b"] = "_YPositionb";
nameMap["X position c"] = "_Xpositionc";
nameMap["Y position c"] = "_Ypositionc";
nameMap["Y position d"] = "_Ypositiond";
nameMap["X position e"] = "_Xpositione";
nameMap["Y position e"] = "_Ypositione";
nameMap["X position d"] = "_Xpositiond";
nameMap["Change Track 1?"] = "_ChangeTrack1";
nameMap["Next Track"] = "_NextTrack";
nameMap["Change Track 2?"] = "_ChangeTrack2";
nameMap["Previous Scene 6"] = "_PreviousScene6";
nameMap["X position f"] = "_Xpositionf";
nameMap["Y position f"] = "_Ypositionf";
nameMap["Previous Scene 7"] = "_PreviousScene7";
nameMap["X position g"] = "_Xpositiong";
nameMap["Y position g"] = "_Ypositiong";
nameMap["Spawn Location a"] = "_SpawnLocationa";
nameMap["Spawn Location B"] = "_SpawnLocationB";
nameMap["Spawn Location c"] = "_SpawnLocationc";
nameMap["Spawn Location d"] = "_SpawnLocationd";
nameMap["Spawn Location e"] = "_SpawnLocatione";
nameMap["Spawn Location f"] = "_SpawnLocationf";
nameMap["Spawn Location g"] = "_SpawnLocationg";
nameMap["Player actor"] = "_Playeractor";
nameMap["Next Scene 1"] = "_NextScene";
nameMap["Fade Out Time"] = "_FadeOutTime";
nameMap["Fade In Time"] = "_FadeInTime";
nameMap["Next Scene Name 1"] = "_NextSceneName1";
nameMap["Wind 1"] = "_Wind1";
nameMap["Region 1"] = "_Region";
nameMap["Next Scene 2"] = "_NextScene2";
nameMap["Next Scene Name 2"] = "_NextSceneName2";
nameMap["Wind 2"] = "_Wind2";
nameMap["Region 2"] = "_Region2";
nameMap["Next Scene 3"] = "_NextScene3";
nameMap["Next Scene Name 3"] = "_NextSceneName3";
nameMap["Wind 3"] = "_Wind3";
nameMap["region 3"] = "_region3";
nameMap["Next Scene 4"] = "_NextScene4";
nameMap["Next Scene Name 4"] = "_NextSceneName4";
nameMap["Wind 4"] = "_Wind4";
nameMap["Region 4"] = "_Region4";
nameMap["Next Scene 5"] = "_NextScene5";
nameMap["Next Scene Name 5"] = "_NextSceneName5";
nameMap["Wind 5"] = "_Wind5";
nameMap["Region 5"] = "_Region5";
}
override public function forwardMessage(msg:String):void
{
}
}
}
Thank you for your time!
It appears that your issue is happening because you have a space between "!" and "=" on all of the lines that you tagged. You're attempting to use the inequality operator, which is "!=", or an exclamation mark followed by an equals sign with no space.
When you have the exclamation mark by itself, it is interpreted as a "logical not" and the error message that you're getting is because the compiler is trying to make its best guess at what you're trying to do.
If you remove all of the spaces between "!" and "=" then this error should be taken care of.