The_Oakster 0 Posted June 29, 2004 I have added the ammo crate load out from the sticky thread on frequently asked questions. I cut and pasted it in to the mission file but i now get an error message but i cant see whats wrong? The error message is - Mission/Vehicles/Item.1.init': 'M' encountered instead of ';' the load out from the mission file is - class Item1 { position[]={1661.708496,24.974998,5573.960449}; azimut=5.000000; id=1; side="EMPTY"; vehicle="ReammoBoxWest"; lock="LOCKED"; skill=0.200000; init="this addweaponcargo ["M16",15]; this addweaponcargo ["M21",5]; this addmagazinecargo ["M16",100]; this addmagazinecargo ["M21",50]; this addweaponcargo ["LAWLauncher",5]; this addmagazinecargo ["LAWLauncher",50]; this addweaponcargo ["M60",5]; this addmagazinecargo ["M60",20]; this addmagazinecargo ["SmokeShell", 10]; this addweaponcargo ["Binocular", 5]; this addweaponcargo ["HandGrenade",15]; this addmagazinecargo ["HandGrenade",15]; this addweaponcargo ["FlareRed",15]; this addmagazinecargo ["FlareRed",15]; this addweaponcargo ["FlareGreen",15]; this addmagazinecargo ["FlareYellow",15]; this addweaponcargo ["FlareYellow",15]; this addweaponcargo ["Flare",15]; this addmagazinecargo ["Flare",15]; this addweaponcargo ["SmokeShellRed",15]; this addmagazinecargo ["SmokeShellRed",15]; this addweaponcargo ["SmokeShellGreen",15]; this addmagazinecargo ["SmokeShellGreen",15]"; }; I cant see where the mystery M is? Share this post Link to post Share on other sites
The_Oakster 0 Posted June 29, 2004 I've sorted it now but i dont know how. The only thing i did differently was adding the load out to the object in the editor rather than adding it to the mission.sqs! I wouldn't have thought it would have made much difference!! Share this post Link to post Share on other sites
Winters 1 Posted June 29, 2004 Here is a simple script that you could use that will allow you to easily fill ammocrates with any weapons you choose. I used this for a nam mission but half of it also lists normal weapons (which i didnt use for the Nam mission) try it out. Credit goes to Backoff and Deadmeat for the script. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;------------------------------------------------------------------------------ ;AmmoCrate.sqs v 2.0 ;By Backoff & DeaDMeaT Productions ;Add weapon to an ammo crate ;Exemple: type this line in the init field of an ammo crate ;[this, "LIGHT", "WEST"] exec "ammocrate.sqs" ;[objectname, load type, side] exec "ammocrate.sqs" ;load type: ;---------- ;"LIGHT": basic weapons ;"MEDIUM": weapons ;"HARD": rocket & grenade launcher ;"Explosive": hand grenade, mine, etc... ;"Equipment": night vision google, binocular, etc... ;side: ;----- ;"WEST": add ammo/weapon for west side ;"EAST": add ammo/weapon for east side ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------ _crate = _this select 0 _type = _this select 1 _side = _this select 2 ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------ clearmagazinecargo _crate clearweaponcargo _crate ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------ ?(_type == "Equipment"): goto "Equipment" ?(_type == "Explosive"): goto "Explosive" goto format ["%1%2", _type, _side] Goto "End" ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------ #LightWEST _crate AddWeaponCargo ["sebm16a1", 20] _crate AddWeaponCargo ["sebm14", 20] _crate AddWeaponCargo ["sebcar15", 20] _crate AddMagazineCargo ["sebm16a1magn", 200] _crate AddMagazineCargo ["sebm14magn", 200] _crate AddMagazineCargo ["sebcar15magn", 200] Goto "End" ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------ #LightEAST _crate AddWeaponCargo ["sebsks", 20] _crate AddWeaponCargo ["sebrpd", 20] _crate AddWeaponCargo ["sebrpglauncher", 20] _crate AddMagazineCargo ["sebsksmagn", 200] _crate AddMagazineCargo ["sebrpdmagn", 200] _crate AddMagazineCargo ["sebrpgrocket", 200] Goto "End" ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------ #MediumWEST _crate AddWeaponCargo ["sebm16a1gl", 20] _crate AddWeaponCargo ["sebm60", 20] _crate AddWeaponCargo ["sebm79", 20] _crate AddWeaponCargo ["seblawlauncher", 20] _crate AddWeaponCargo ["seb90mmrecoiless", 20] _crate AddMagazineCargo ["sebm16a1magn", 200] _crate AddMagazineCargo ["sebm60magn", 200] _crate AddMagazineCargo ["sebm79he", 300] _crate AddMagazineCargo ["seblawrocket", 200] _crate AddMagazineCargo ["seb90mmrocket", 200] Goto "End" ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------ #MediumEAST _crate AddWeaponCargo ["AK47", 20] _crate AddWeaponCargo ["PK", 20] _crate AddWeaponCargo ["G36a", 20] _crate AddWeaponCargo ["RPGLauncher", 20] _crate AddMagazineCargo ["Pipebomb", 200] _crate AddMagazineCargo ["AK47", 200] _crate AddMagazineCargo ["PK", 200] _crate AddMagazineCargo ["G36aMag", 200] _crate AddMagazineCargo ["RPGLauncher", 200] _crate AddMagazineCargo ["Mine", 200] Goto "End" ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------ #HardWEST _crate AddWeaponCargo ["LAWLauncher", 20] _crate AddWeaponCargo ["M16GrenadeLauncher", 20] _crate AddWeaponCargo ["MM1", 20] _crate AddWeaponCargo ["AALauncher", 20] _crate AddWeaponCargo ["CarlGustavLauncher", 20] _crate AddMagazineCargo ["AALauncher", 200] _crate AddMagazineCargo ["M16", 200] _crate AddMagazineCargo ["LAWLauncher", 200] _crate AddMagazineCargo ["GrenadeLauncher", 200] _crate AddMagazineCargo ["MM1Magazine", 200] _crate AddMagazineCargo ["CarlGustavLauncher", 200] Goto "End" ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------ #HardEAST _crate AddWeaponCargo ["RPGLauncher", 20] _crate AddWeaponCargo ["AK74GrenadeLauncher", 20] _crate AddWeaponCargo ["6G30", 20] _crate AddMagazineCargo ["AK74", 200] _crate AddMagazineCargo ["RPGLauncher", 200] _crate AddMagazineCargo ["6G30Magazine", 200] _crate AddMagazineCargo ["GrenadeLauncher", 200] Goto "End" ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------ #Explosive _crate AddMagazineCargo ["HandGrenade", 200] _crate AddMagazineCargo ["Mine", 200] _crate AddMagazineCargo ["Timebomb", 200] _crate AddMagazineCargo ["Pipebomb", 200] Goto "end" ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------ #Equipment _crate AddWeaponCargo ["NVgoggles", 200] _crate AddWeaponCargo ["Binocular", 200] _crate AddWeaponCargo ["Flare", 200] _crate AddWeaponCargo ["SmokeShell", 200] Goto "end" ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------ #end Exit ;------------------------------------------------------------------------------ Share this post Link to post Share on other sites