Jump to content
Sign in to follow this  
Alex116

Map missing.

Recommended Posts

Hey,

I created a mission and everything was working fine, untill I decided to add a respawn script to my mission.

In the end, it didn't work and I deleted the respawn script again. Now every time I start the mission, I have no MAP when I press M, nor do my units recieve their gear. Wich is given to them by placing this in their init field.

units init field

_null = [this, ""SFGearL""] execVM ""scripts\gear.sqf""; charlie = group this; this moveincargo [heavy1,16];";
				description="SEAL Team 10 - Charlie - Platoon Leader (C/O) - (C130J)";

gear.sqf

#define BASIC \
_unit addweapon "ACE_Map"; \
_unit addweapon "ItemWatch"; \
_unit addweapon "ItemCompass"; \
_unit addweapon "ACRE_PRC343"; \
_unit addweapon "ACE_Earplugs"; \
_unit addweapon "NVGoggles"; \
_unit addweapon "ACE_GlassesBalaklava"; \
[_unit, 1, 1, 1] call ACE_fnc_PackIFAK; \
_unit addmagazine "ACE_Morphine"; \
_unit addmagazine "ACE_Epinephrine"; 
_unit addmagazine "ACE_Bandage";

private ["_unit", "_type", "_team"];
_unit = _this select 0;
_type = _this select 1;
_team = _this select 2;

removeallweapons _unit;
removeAllItems _unit;
removebackpack _unit;
_unit assignTeam _team;

switch (_type) do {
case "SFGearL": {
	// Items
	BASIC;
	_unit addweapon "ItemGPS";
	_unit addweapon "Binocular";
	// Primary weapon
	{_unit addmagazine "30Rnd_556x45_StanagSD";} forEach [1,2,3,4,5,6,7];
	_unit addweapon "M4A1_AIM_SD_camo";
	_unit addweapon "ACE_USPSD"; 
	// Grenades
	{_unit addmagazine "HandGrenade_West";} forEach [1,2];
	_unit addmagazine "ACE_M84";
	_unit addmagazine "SmokeShellGreen";
	_unit addmagazine "SmokeShell";

	// Backpack
           _unit addweapon "ACE_ParachutePack";
	_temp = [_unit, "30Rnd_556x45_StanagSD",5] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "SmokeShell",1] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "SmokeShellGreen",1] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "ACE_Knicklicht_R",5] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "ACE_Knicklicht_B",5] spawn ACE_fnc_packMagazine;	
	_temp = [_unit, "ACE_Knicklicht_G",5] spawn ACE_fnc_packMagazine;	
	_temp = [_unit, "ACE_Knicklicht_Y",5] spawn ACE_fnc_packMagazine;	
	_temp = [_unit, "ACE_Knicklicht_W",5] spawn ACE_fnc_packMagazine;	
	_temp = [_unit, "ACE_Knicklicht_IR",5] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "IR_Strobe_Marker"] spawn ACE_fnc_packMagazine;

	// On Back
	_unit setVariable ["ace_weaponOnBack", "ACE_PRC119_ACU"];

};

case "SFGearO": {
	// Items
	BASIC;
	_unit addweapon "ItemGPS";
	_unit addweapon "Binocular";
	// Primary weapon
	{_unit addmagazine "30Rnd_556x45_StanagSD";} forEach [1,2,3,4,5,6,7];
	_unit addweapon "M4A1_AIM_SD_camo";;
	_unit addweapon "ACE_USPSD"; 
	// Grenades
	{_unit addmagazine "HandGrenade_West";} forEach [1,2];
	_unit addmagazine "ACE_M84";
	_unit addmagazine "SmokeShellGreen";
	_unit addmagazine "SmokeShell";

	// Backpack
	_unit addweapon "ACE_ParachutePack";
	_temp = [_unit, "30Rnd_556x45_StanagSD",5] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "SmokeShell",1] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "SmokeShellGreen",1] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "ACE_Knicklicht_R",5] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "ACE_Knicklicht_B",5] spawn ACE_fnc_packMagazine;	
	_temp = [_unit, "ACE_Knicklicht_G",5] spawn ACE_fnc_packMagazine;	
	_temp = [_unit, "ACE_Knicklicht_Y",5] spawn ACE_fnc_packMagazine;	
	_temp = [_unit, "ACE_Knicklicht_W",5] spawn ACE_fnc_packMagazine;	
	_temp = [_unit, "ACE_Knicklicht_IR",5] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "IR_Strobe_Marker"] spawn ACE_fnc_packMagazine;

	// On Back 
	_unit setVariable ["ace_weaponOnBack", "ACE_FAST_PackEDC"];

};

case "SFGearUAV": {
	// Items
	BASIC;
	_unit addweapon "ItemGPS";
	_unit addweapon "Binocular";
	// Primary weapon
	{_unit addmagazine "30Rnd_556x45_StanagSD";} forEach [1,2,3,4,5,6,7];
	_unit addweapon "M4A1_AIM_SD_camo";
	_unit addweapon "ACE_USPSD"; 
	// Grenades
	{_unit addmagazine "HandGrenade_West";} forEach [1,2];
	_unit addmagazine "ACE_M84";
	_unit addmagazine "SmokeShellGreen";
	_unit addmagazine "SmokeShell";

	// Backpack
	_unit addweapon "ACE_ParachutePack";
	_temp = [_unit, "30Rnd_556x45_StanagSD",5] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "SmokeShell",1] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "SmokeShellGreen",1] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "ACE_Knicklicht_R",5] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "ACE_Knicklicht_B",5] spawn ACE_fnc_packMagazine;	
	_temp = [_unit, "ACE_Knicklicht_G",5] spawn ACE_fnc_packMagazine;	
	_temp = [_unit, "ACE_Knicklicht_Y",5] spawn ACE_fnc_packMagazine;	
	_temp = [_unit, "ACE_Knicklicht_W",5] spawn ACE_fnc_packMagazine;	
	_temp = [_unit, "ACE_Knicklicht_IR",5] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "IR_Strobe_Marker"] spawn ACE_fnc_packMagazine;

	_unit setVariable ["ace_weaponOnBack", "ACE_PRC119_ACU"];

case "SFGearM": {
	// Items
	BASIC;
	_unit addweapon "ItemGPS";
	_unit addweapon "Binocular";
	// Primary weapon
	{_unit addmagazine "30Rnd_556x45_StanagSD";} forEach [1,2,3,4,5,6,7];
	_unit addweapon "M4A1_AIM_SD_camo";
	_unit addweapon "ACE_USPSD"; 
	// Grenades
	{_unit addmagazine "HandGrenade_West";} forEach [1,2];

	_unit addmagazine "ACE_M84";

	// Backpack
	_unit addweapon "ACE_ParachutePack";
	_temp = [_unit, "ACE_Bandage",10] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "ACE_LargeBandage",5] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "ACE_Tourniquet",5] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "ACE_Morphine",20] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "ACE_Epinephrine",20] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "ACE_Splint",1] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "ACE_IV",2] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "ACE_Plasma ",5] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "ACE_VS21MEDICPANEL_M",2] spawn ACE_fnc_packMagazine;
           _temp = [_unit, "ACE_Knicklicht_R",5] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "ACE_Knicklicht_B",5] spawn ACE_fnc_packMagazine;	
	_temp = [_unit, "ACE_Knicklicht_G",5] spawn ACE_fnc_packMagazine;	
	_temp = [_unit, "ACE_Knicklicht_Y",5] spawn ACE_fnc_packMagazine;	
	_temp = [_unit, "ACE_Knicklicht_W",5] spawn ACE_fnc_packMagazine;	
	_temp = [_unit, "ACE_Knicklicht_IR",5] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "SmokeShellYellow",5] spawn ACE_fnc_packMagazine;
	_temp = [_unit, "IR_Strobe_Marker"] spawn ACE_fnc_packMagazine;

	// On Back
	_unit setVariable ["ace_weaponOnBack", "ACE_Rucksack_MOLLE_Brown_Medic"];


};

};

There must be an error somewhere, though -showscripterrors doest come up with anything, nor can I find it myself. What am I missing here?

init.sqf

ace_sys_wounds_no_medical_gear = true;  //disable stupid ACE Medical for players, trust me geeys.
ace_sys_wounds_noai = true;  //disable stupid ACE medical for AI
ace_sys_spectator_playable_only = false; // Can't spectate AI

     ace_sys_spectator_no_butterfly_mode = true; // No flying camera

    	ace_sys_tracking_markers_enabled = false; // Disables tracking markers
ace_sys_tracking_radio_required = true; // Disables tracking markers for units without a radio
ace_sys_tracking_gps_required = true; // Disables tracking markers for units without a GPS
ace_settings_enable_vd_change = true;
ace_settings_enable_tg_change = false;


if (isServer) then  //server
{

setViewDistance 4000;
[] execVM "scripts\aiHearTalking.sqf";

};



if (!(isNull player)) then  //non-JIP player
{
waitUntil{!(isNil "BIS_fnc_init")};


[] execVM "intro.sqf";
     [] execVM "briefing.sqf";

0 fadeRadio 0;  //mute in-game radio commands
maxViewDist = 4000;
setViewDistance maxViewDist;
viewDist = maxViewDist;
player setVariable ["BIS_noCoreConversations", true];  //disable greeting menu


uav2 setVariable ["c_op3uav","MQ-9"]; uav2 synchronizeObjectsAdd [(unitBackpack player)];



//effects

//	[] execVM "screen.sqf";

"colorCorrections" ppEffectAdjust [2, 30, 0, [0.0, 0.0, 0.0, 0.0], [0.8*2, 0.5*2, 0.0, 0.7], [0.9, 0.9, 0.9, 0.0]];
"colorCorrections" ppEffectCommit 0;
//"colorCorrections" ppEffectAdjust [1, 1, 0, [0.0, 0.0, 0.0, 0.0], [0.8*2, 0.5*2, 0.0, 0.7], [0.9, 0.9, 0.9, 0.0]];
"colorCorrections" ppEffectAdjust [1, 0.8, -0.001, [0.0, 0.0, 0.0, 0.0], [0.8*2, 0.5*2, 0.0, 0.7], [0.9, 0.9, 0.9, 0.0]];  
"colorCorrections" ppEffectCommit 3;
"colorCorrections" ppEffectEnable true;
"filmGrain" ppEffectEnable true; 
"filmGrain" ppEffectAdjust [0.02, 1, 1, 0.1, 1, false];
"filmGrain" ppEffectCommit 5;

//--- Wind & Dust
[] spawn {
   waituntil {isplayer player};
   setwind [0.201112,0.204166,true];
   while {true} do {
       _ran = ceil random 5;
       playsound format ["wind_%1",_ran];
       _obj = vehicle player;
       _pos = position _obj;

       //--- Dust
           setwind [0.201112*2,0.204166*2,false];
       _velocity = [random 10,random 10,-1];
       _color = [1.0, 0.9, 0.8];
       _alpha = 0.02 + random 0.02;
       _ps = "#particlesource" createVehicleLocal _pos;  
       _ps setParticleParams [["\Ca\Data\ParticleEffects\Universal\universal.p3d", 16, 12, 8], "", "Billboard", 1, 3, [0, 0, -6], _velocity, 1, 1.275, 1, 0, [9], [_color + [0], _color + [_alpha], _color + [0]], [1000], 1, 0, "", "", _obj];
       _ps setParticleRandom [3, [30, 30, 0], [0, 0, 0], 1, 0, [0, 0, 0, 0.01], 0, 0];
       _ps setParticleCircle [0.1, [0, 0, 0]];
       _ps setDropInterval 0.01;

       sleep (random 1);
       deletevehicle _ps;
       _delay = 10 + random 20;
       sleep _delay;

   };
};

//--- Ash
[] spawn {
   waituntil {isplayer player};
   _pos = position player;
   _parray = [
   /* 00 */        ["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 8, 1],//"\Ca\Data\cl_water",
   /* 01 */        "",
   /* 02 */        "Billboard",
   /* 03 */        1,
   /* 04 */        4,
   /* 05 */        [0,0,0],
   /* 06 */        [0,0,0],
   /* 07 */        1,
   /* 08 */        0.000001,
   /* 09 */        0,
   /* 10 */        1.4,
   /* 11 */        [0.05,0.05],
   /* 12 */        [[0.1,0.1,0.1,1]],
   /* 13 */        [0,1],
   /* 14 */        0.2,
   /* 15 */        1.2,
   /* 16 */        "",
   /* 17 */        "",
   /* 18 */        vehicle player
   ];
   _snow = "#particlesource" createVehicleLocal _pos;  
   _snow setParticleParams _parray;
   _snow setParticleRandom [0, [10, 10, 7], [0, 0, 0], 0, 0.01, [0, 0, 0, 0.1], 0, 0];
   _snow setParticleCircle [0.0, [0, 0, 0]];
   _snow setDropInterval 0.03;

   _oldPlayer = vehicle player;
   while {true} do {
       waituntil {vehicle player != _oldPlayer};
       _parray set [18,vehicle player];
       _snow setParticleParams _parray;
       _oldPlayer = vehicle player;
   };
};

//effects



};

description.ext


// Mission Header
class Header
{
 gameType = Coop;
 minPlayers = 1;
 maxPlayers = 20;
};

loadScreen = "image\load.paa";


OnLoadIntroTime = True;
OnLoadMissionTime = True;
OnLoadIntro = "Mission by Falco";

respawn = 0;
disabledAI = 1;



};

If you'd like to see any more files, please ask. I have no idea where I have gone wrong.

Share this post


Link to post
Share on other sites

One thing i noticed at first glance:

_null = [this, ""SFGearL""] execVM ""scriptsgear.sqf""; charlie = group this; this moveincargo [heavy1,16];";

Shouldn't that be scripts\gear.sqf

Share this post


Link to post
Share on other sites

I don't use ACE but this line looks wrong if it's in a units init

_null = [this, ""SFGearL""] execVM ""scriptsgear.sqf""; charlie = group this; this moveincargo [heavy1,16];";

description="SEAL Team 10 - Charlie - Platoon Leader (C/O) - (C130J)";

Quotes are messed up, try this

_null = [this, "SFGearL"] execVM "scriptsgear.sqf"; charlie = group this; this moveincargo [heavy1,16];

description="SEAL Team 10 - Charlie - Platoon Leader (C/O) - (C130J)";

Share this post


Link to post
Share on other sites
Are you using the showscripterrors parameter?

Yep, it doesnt give me any error.

I don't use ACE but this line looks wrong if it's in a units init

_null = [this, ""SFGearL""] execVM ""scriptsgear.sqf""; charlie = group this; this moveincargo [heavy1,16];";

description="SEAL Team 10 - Charlie - Platoon Leader (C/O) - (C130J)";

Quotes are messed up, try this

_null = [this, "SFGearL"] execVM "scriptsgear.sqf"; charlie = group this; this moveincargo [heavy1,16];

description="SEAL Team 10 - Charlie - Platoon Leader (C/O) - (C130J)";

I took it from the mission.sqm, hence the quotes. It has single quotes in the editor.

One thing i noticed at first glance:

_null = [this, ""SFGearL""] execVM ""scriptsgear.sqf""; charlie = group this; this moveincargo [heavy1,16];";

Shouldn't that be scripts\gear.sqf

Fixed that, not sure how I got rid of the"\".

It's still messed up tough. I cant find the error thats preventing the gear to spawn and the map to dissapear.

Edited by Alex116

Share this post


Link to post
Share on other sites

Isn't #define a simple one liner? That means that BASIC = \ here, although I'm not sure. Would be cool to know #define isn't always a one-liner, allows for better use.

Share this post


Link to post
Share on other sites

The gear.sqf always worked perfectly. I didnt change anything in it. I think its something else preventing it, the same thing thats preventing the map to show up.

---------- Post added at 15:21 ---------- Previous post was at 15:16 ----------

Heres the .pbo if anyone cares to take a closer look at what's causing this.

http://www.4shared.com/file/gsN1bekq/falcoV4MCN_Aliabad.html

Share this post


Link to post
Share on other sites

I would have taken a look at it if it wasn't for that crappy 4shared service which won't let me download anything but download managers and other useless tools.

Share this post


Link to post
Share on other sites

Okay so I looked around because of the #define stuff and I don't know how it is with sqf, but from what I can gather, for multi-line #define you need curly braces and a backslash after every line which tells the program it's continuing onto the next line. That's how it is in C++ though so I am not sure if it's the cause here, but you could try it out.

Share this post


Link to post
Share on other sites

It's strange tough because it always worked fine, untill I added a respawn script, wich made the script fail or w/e. I took everything from the respawn script and deleted it after I noticed how the script failed.

Share this post


Link to post
Share on other sites

The define is definitely wrong. The preprocessor will only consider _unit addweapon "ACE_Map"; to be a part of the define, the rest of the lines will be executed by the script interpreter and silently fail (:banghead:) because _unit is undefined at that point.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×