Jump to content
  • 0

incountered instead of '='


MultiGamer

Question

Hi all!
what could be the problem? error : incountered instead of '='

 

the lines:

        class Item1 {
            name = "tradezone_z";
            position[] = {18454.9,0.148972,14272.8};
            a = 100;
            b = 100;
            angle = -130.966;
2058 line:  activationBy = "ANY";
            repeating = 1;
            interruptable = 1;
            age = "UNKNOWN";
            expCond = "(vehicle player) in thislist;";
            expActiv = "[""ESpawn"",[""you have entered the safe zone.""]] call bis_fnc_showNotification; _safeZoneFiredEH = player addEventHandler ["Fired", {    deleteVehicle (_this select 6);    }];";
            expDesactiv = "[""EuSpawn"",[""you went with the safe zone.""]] call bis_fnc_showNotification; player removeEventHandler["Fired", _safeZoneFiredEH];";
            class Effects{};
    };

image.png

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

 

Try :

		class Item1
		{
			position[]={18454.9,0.148972,14272.8}; //WEST
			activationBy="ANY";
			repeating=1;
			interruptable=1;
			age="UNKNOWN";
			name="tradezone_z";
			expCond="(player distance tradezone_z) < 100;";
			expActiv = "[""ESpawn"",[""you have entered the safe zone.""]] call bis_fnc_showNotification; _safeZoneFiredEH = player addEventHandler ["Fired", {    deleteVehicle (_this select 6);    }];";
            expDesactiv = "[""EuSpawn"",[""you went with the safe zone.""]] call bis_fnc_showNotification; player removeEventHandler["Fired", _safeZoneFiredEH];";
            class Effects{};
			{
			
			};
		};

image.png

doesn't work.

The error.

Link to comment
Share on other sites

  • 0

Your error was this

player addEventHandler ["Fired"    <- WRONG
player addEventHandler [""Fired""    <- RIGHT
player addEventHandler ['Fired'    <- RIGHT
Same for the line with «removeEventHandler["Fired"»

Second fault in Your code:

Using a local variable as handle will not work, since trigger onAct and onDeact are in different scopes.

Greez KiloSwiss

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...