Jump to content

Scripting problems


X3NOTIME

Recommended Posts

I've made a house mod recently and have completed everything but the inventory sorting scripts. I borrowed the base scripts from OrigonOfPain's Yangtzee bunker mod and changed the id's of everything to suit my personal modbut the script wont save and i dont know how to fix it. i ran it through cipsis' validator but i dont really understand the color coding and whatnot. i have very little experience with scripting and any help would be greatly apreciated.

 

scn X3NOAmmoSortSCRIPT

short choice
short ammocount

begin OnActivate
if ( isActionRef Player )
	set choice to 1
	ShowMessage XENOAmmoSortMsg
endif
end

begin GameMode
if (choice)
	Set choice to GetButtonPressed
			if ( choice ==0 )

				;10mm
				set ammocount to player.GetItemCount Ammo10mm
				if ( ammocount > 0)
					Player.RemoveItem Ammo10mm ammocount 1
					XENO10mmBoxREF.AddItem Ammo10mm ammocount
				set ammocount to 0
				endif

				;10mm
				set ammocount to player.GetItemCount Ammo10mmHollowPoint
				if ( ammocount > 0)
					Player.RemoveItem Ammo10mmHollowPoint ammocount 1
					XENO10mmBoxREF.AddItem Ammo10mmHollowPoint ammocount
				set ammocount to 0
				endif

				;10mm
				set ammocount to player.GetItemCount Ammo10mmJHPHandLoad
				if ( ammocount > 0)
					Player.RemoveItem Ammo10mmJHPHandLoad ammocount 1
					XENO10mmBoxREF.AddItem Ammo10mmJHPHandLoad ammocount
				set ammocount to 0
				endif

				;308Caliber
				set ammocount to player.GetItemCount Ammo308
				if ( ammocount > 0)
					Player.RemoveItem Ammo308 ammocount 1
					XENO308BoxREF.AddItem Ammo308 ammocount
				set ammocount to 0
				endif

				;308Caliber
				set ammocount to player.GetItemCount Ammo308ArmorPiercing
				if ( ammocount > 0)
					Player.RemoveItem Ammo308ArmorPiercing ammocount 1
					XENO308BoxREF.AddItem Ammo308ArmorPiercing ammocount
				set ammocount to 0
				endif

				;308Caliber
				set ammocount to player.GetItemCount Ammo308HollowPoint
				if ( ammocount > 0)
					Player.RemoveItem Ammo308HollowPoint ammocount 1
					XENO308BoxREF.AddItem Ammo308HollowPoint ammocount
				set ammocount to 0
				endif

				;308Caliber
				set ammocount to player.GetItemCount Ammo308JSPHandLoad
				if ( ammocount > 0)
					Player.RemoveItem Ammo308JSPHandLoad ammocount 1
					XENO308BoxREF.AddItem Ammo308JSPHandLoad ammocount
				set ammocount to 0
				endif

				;44Magnum
				set ammocount to player.GetItemCount Ammo44magnum
				if ( ammocount > 0)
					Player.RemoveItem Ammo44magnum ammocount 1
					XENO44BoxREF.AddItem Ammo44magnum ammocount
				set ammocount to 0
				endif

				;44Magnum
				set ammocount to player.GetItemCount Ammo44MagnumHollowPoint
				if ( ammocount > 0)
					Player.RemoveItem Ammo44MagnumHollowPoint ammocount 1
					XENO44BoxREF.AddItem Ammo44MagnumHollowPoint ammocount
				set ammocount to 0
				endif

				;44Magnum
				set ammocount to player.GetItemCount Ammo44MagnumSWCHandLoad
				if ( ammocount > 0)
					Player.RemoveItem Ammo44MagnumSWCHandLoad ammocount 1
					XENO44BoxREF.AddItem Ammo44MagnumSWCHandLoad ammocount
				set ammocount to 0
				endif

				;44Magnum
				set ammocount to player.GetItemCount Ammo44Special
				if ( ammocount > 0)
					Player.RemoveItem Ammo44Special ammocount 1
					XENO44BoxREF.AddItem Ammo44Special ammocount
				set ammocount to 0
				endif
				
				;5.56mm
				set ammocount to player.GetItemCount Ammo556mm
				if ( ammocount > 0)
					Player.RemoveItem Ammo556mm ammocount 1
					XENO556BoxREF.AddItem Ammo556mm ammocount
				set ammocount to 0
				endif

				;5.56mm
				set ammocount to player.GetItemCount Ammo556mmArmorPiercing
				if ( ammocount > 0)
					Player.RemoveItem Ammo556mmArmorPiercing ammocount 1
					XENO556BoxREF.AddItem Ammo556mmArmorPiercing ammocount
				set ammocount to 0
				endif

				;5.56mm
				set ammocount to player.GetItemCount Ammo556mmHollowPoint
				if ( ammocount > 0)
					Player.RemoveItem Ammo556mmHollowPoint ammocount 1
					XENO556BoxREF.AddItem Ammo556mmHollowPoint ammocount
				set ammocount to 0
				endif

				;5.56mm
				set ammocount to player.GetItemCount Ammo556mmSurplus
				if ( ammocount > 0)
					Player.RemoveItem Ammo556mmSurplus ammocount 1
					XENO556BoxREF.AddItem Ammo556mmSurplus ammocount
				set ammocount to 0
				endif

				;5mm
				set ammocount to player.GetItemCount Ammo5mm
				if ( ammocount > 0)
					Player.RemoveItem Ammo5mm ammocount 1
					XENO5mmBoxREF.AddItem Ammo5mm ammocount
				set ammocount to 0
				endif

				;5mm
				set ammocount to player.GetItemCount Ammo5mmArmorPiercing
				if ( ammocount > 0)
					Player.RemoveItem Ammo5mmArmorPiercing ammocount 1
					XENO5mmBoxREF.AddItem Ammo5mmArmorPiercing ammocount
				set ammocount to 0
				endif

				;5mm
				set ammocount to player.GetItemCount Ammo5mmHollowPoint
				if ( ammocount > 0)
					Player.RemoveItem Ammo5mmHollowPoint ammocount 1
					XENO5mmBoxREF.AddItem Ammo5mmHollowPoint ammocount
				set ammocount to 0
				endif

				;5mm
				set ammocount to player.GetItemCount Ammo5mmSurplus
				if ( ammocount > 0)
					Player.RemoveItem Ammo5mmSurplus ammocount 1
					XENO5mmBoxREF.AddItem Ammo5mmSurplus ammocount
				set ammocount to 0
				endif

				;MicroFusionCell
				set ammocount to player.GetItemCount AmmoMicroFusionCell
				if ( ammocount > 0)
					Player.RemoveItem AmmoMicroFusionCell ammocount 1
					XENOMFCellBoxREF.AddItem AmmoMicroFusionCell ammocount
				set ammocount to 0
				endif

				;MicroFusionCell
				set ammocount to player.GetItemCount AmmoMicroFusionCellBulk
				if ( ammocount > 0)
					Player.RemoveItem AmmoMicroFusionCellBulk ammocount 1
					XENOMFCellBoxREF.AddItem AmmoMicroFusionCellBulk ammocount
				set ammocount to 0
				endif

				;MicroFusionCell
				set ammocount to player.GetItemCount AmmoMicroFusionCellMaxCharge
				if ( ammocount > 0)
					Player.RemoveItem AmmoMicroFusionCellMaxCharge ammocount 1
					XENOMFCellBoxREF.AddItem AmmoMicroFusionCellMaxCharge ammocount
				set ammocount to 0
				endif

				;MicroFusionCell
				set ammocount to player.GetItemCount AmmoMicroFusionCellOverCharge
				if ( ammocount > 0)
					Player.RemoveItem AmmoMicroFusionCellOverCharge ammocount 1
					XENOMFCellBoxREF.AddItem AmmoMicroFusionCellOverCharge ammocount
				set ammocount to 0
				endif

				;ElectronChargePack
				set ammocount to player.GetItemCount AmmoElectronChargePack
				if ( ammocount > 0)
					Player.RemoveItem AmmoElectronChargePack ammocount 1
					XENOECPackBoxREF.AddItem AmmoElectronChargePack ammocount
				set ammocount to 0
				endif

				;ElectronChargePack
				set ammocount to player.GetItemCount AmmoElectronChargePackBulk
				if ( ammocount > 0)
					Player.RemoveItem AmmoElectronChargePackBulk ammocount 1
					XENOECPackBoxREF.AddItem AmmoElectronChargePackBulk ammocount
				set ammocount to 0
				endif

				;ElectronChargePack
				set ammocount to player.GetItemCount AmmoElectronChargePackMaxCharge
				if ( ammocount > 0)
					Player.RemoveItem AmmoElectronChargePackMaxCharge ammocount 1
					XENOECPackBoxREF.AddItem AmmoElectronChargePackMaxCharge ammocount
				set ammocount to 0
				endif

				;ElectronChargePack
				set ammocount to player.GetItemCount AmmoElectronChargePackOverCharge
				if ( ammocount > 0)
					Player.RemoveItem AmmoElectronChargePackOverCharge ammocount 1
					XENOECPackBoxREF.AddItem AmmoElectronChargePackOverCharge ammocount
				set ammocount to 0
				endif

				;SmallEnergyCell
				set ammocount to player.GetItemCount AmmoSmallEnergyCell
				if ( ammocount > 0)
					Player.RemoveItem AmmoSmallEnergyCell ammocount 1
					XENOSECellBoxREF.AddItem AmmoSmallEnergyCell ammocount
				set ammocount to 0
				endif

				;SmallEnergyCell
				set ammocount to player.GetItemCount AmmoSmallEnergyCellBulk
				if ( ammocount > 0)
					Player.RemoveItem AmmoSmallEnergyCellBulk ammocount 1
					XENOSECellBoxREF.AddItem AmmoSmallEnergyCellBulk ammocount
				set ammocount to 0
				endif

				;SmallEnergyCell
				set ammocount to player.GetItemCount AmmoSmallEnergyCellMaxCharge
				if ( ammocount > 0)
					Player.RemoveItem AmmoSmallEnergyCellMaxCharge ammocount 1
					XENOSECellBoxREF.AddItem AmmoSmallEnergyCellMaxCharge ammocount
				set ammocount to 0
				endif

				;SmallEnergyCell
				set ammocount to player.GetItemCount AmmoSmallEnergyCellOverCharge
				if ( ammocount > 0)
					Player.RemoveItem AmmoSmallEnergyCellOverCharge ammocount 1
					XENOSECellBoxREF.AddItem AmmoSmallEnergyCellOverCharge ammocount
				set ammocount to 0
				endif

				;MesmetronPowerCell
				set ammocount to player.GetItemCount AmmoMesmetronPowerCell
				if ( ammocount > 0)
					Player.RemoveItem AmmoMesmetronPowerCell ammocount 1
					XENOMesmCellBoxREF.AddItem AmmoMesmetronPowerCell ammocount
				set ammocount to 0
				endif

				;AmmoAlienPowerCell
				set ammocount to player.GetItemCount AmmoAlienPowerCell
				if ( ammocount > 0)
					Player.RemoveItem AmmoAlienPowerCell ammocount 1
					XENOAPCellBoxREF.AddItem AmmoAlienPowerCell ammocount
				set ammocount to 0
				endif

				;AmmoBB
				set ammocount to player.GetItemCount AmmoBB
				if ( ammocount > 0)
					Player.RemoveItem AmmoBB ammocount 1
					XENOBBBoxREF.AddItem AmmoBB ammocount
				set ammocount to 0
				endif
	
				;Ammo127mm
				set ammocount to player.GetItemCount Ammo127mm
				if ( ammocount > 0)
					Player.RemoveItem Ammo127mm ammocount 1
					XENO127BoxREF.AddItem Ammo127mm ammocount
				set ammocount to 0
				endif

				;Ammo127mm
				set ammocount to player.GetItemCount Ammo127mmHollowPoint
				if ( ammocount > 0)
					Player.RemoveItem Ammo127mmHollowPoint ammocount 1
					XENO127BoxREF.AddItem Ammo127mmHollowPoint ammocount
				set ammocount to 0
				endif

				;Ammo12Ga
				set ammocount to player.GetItemCount Ammo12Ga
				if ( ammocount > 0)
					Player.RemoveItem Ammo12Ga ammocount 1
					XENO12GABoxREF.AddItem Ammo12Ga ammocount
				set ammocount to 0
				endif

				;Ammo12Ga
				set ammocount to player.GetItemCount Ammo12GaBeanBag
				if ( ammocount > 0)
					Player.RemoveItem Ammo12GaBeanBag ammocount 1
					XENO12GABoxREF.AddItem Ammo12GaBeanBag ammocount
				set ammocount to 0
				endif

				;Ammo12Ga
				set ammocount to player.GetItemCount Ammo12GaCoinShot
				if ( ammocount > 0)
					Player.RemoveItem Ammo12GaCoinShot ammocount 1
					XENO12GABoxREF.AddItem Ammo12GaCoinShot ammocount
				set ammocount to 0
				endif

				;Ammo12Ga
				set ammocount to player.GetItemCount Ammo12GaMagnum
				if ( ammocount > 0)
					Player.RemoveItem Ammo12GaMagnum ammocount 1
					XENO12GABoxREF.AddItem Ammo12GaMagnum ammocount
				set ammocount to 0
				endif

				;Ammo12Ga
				set ammocount to player.GetItemCount Ammo12GaSlug
				if ( ammocount > 0)
					Player.RemoveItem Ammo12GaSlug ammocount 1
					XENO12GABoxREF.AddItem Ammo12GaSlug ammocount
				set ammocount to 0
				endif

				;Ammo20Ga
				set ammocount to player.GetItemCount Ammo20Ga
				if ( ammocount > 0)
					Player.RemoveItem Ammo20Ga ammocount 1
					XENO20GABoxREF.AddItem Ammo20Ga ammocount
				set ammocount to 0
				endif

				;Ammo20Ga
				set ammocount to player.GetItemCount Ammo20GaMagnum
				if ( ammocount > 0)
					Player.RemoveItem Ammo20GaMagnum ammocount 1
					XENO20GABoxREF.AddItem Ammo20GaMagnum ammocount
				set ammocount to 0
				endif

				;Ammo20Ga
				set ammocount to player.GetItemCount Ammo20GaSlug
				if ( ammocount > 0)
					Player.RemoveItem Ammo20GaSlug ammocount 1
					XENO20GABoxREF.AddItem Ammo20GaSlug ammocount
				set ammocount to 0
				endif
				
				;Ammo223
				set ammocount to player.GetItemCount Ammo223
				if ( ammocount > 0)
					Player.RemoveItem Ammo223 ammocount 1
					XENO223BoxREF.AddItem Ammo223 ammocount
				set ammocount to 0
				endif					

				;Ammo22LR
				set ammocount to player.GetItemCount Ammo22LR
				if ( ammocount > 0)
					Player.RemoveItem Ammo22LR ammocount 1
					XENO22LRBoxREF.AddItem Ammo22LR ammocount
				set ammocount to 0
				endif

				;Ammo22LR
				set ammocount to player.GetItemCount Ammo22LRHollowPoint
				if ( ammocount > 0)
					Player.RemoveItem Ammo22LRHollowPoint ammocount 1
					XENO22LRBoxREF.AddItem Ammo22LRHollowPoint ammocount
				set ammocount to 0
				endif

				;Ammo22LR
				set ammocount to player.GetItemCount Ammo22LRPlinking
				if ( ammocount > 0)
					Player.RemoveItem Ammo22LRPlinking ammocount 1
					XENO22LRBoxREF.AddItem Ammo22LRPlinking ammocount
				set ammocount to 0
				endif

				;Ammo25mmGrenade
				set ammocount to player.GetItemCount Ammo25mmGrenade
				if ( ammocount > 0)
					Player.RemoveItem Ammo25mmGrenade ammocount 1
					XENO25mmBoxREF.AddItem Ammo25mmGrenade ammocount
				set ammocount to 0
				endif

				;Ammo25mmGrenade
				set ammocount to player.GetItemCount Ammo25mmGrenadeHighExplosive
				if ( ammocount > 0)
					Player.RemoveItem Ammo25mmGrenadeHighExplosive ammocount 1
					XENO25mmBoxREF.AddItem Ammo25mmGrenadeHighExplosive ammocount
				set ammocount to 0
				endif

				;Ammo357Magnum
				set ammocount to player.GetItemCount Ammo357Magnum
				if ( ammocount > 0)
					Player.RemoveItem Ammo357Magnum ammocount 1
					XENO357BoxREF.AddItem Ammo357Magnum ammocount
				set ammocount to 0
				endif

				;Ammo357Magnum
				set ammocount to player.GetItemCount Ammo357MagnumHollowPoint
				if ( ammocount > 0)
					Player.RemoveItem Ammo357MagnumHollowPoint ammocount 1
					XENO357BoxREF.AddItem Ammo357MagnumHollowPoint ammocount
				set ammocount to 0
				endif

				;Ammo357Magnum
				set ammocount to player.GetItemCount Ammo357MagnumJFPHandLoad
				if ( ammocount > 0)
					Player.RemoveItem Ammo357MagnumJFPHandLoad ammocount 1
					XENO357BoxREF.AddItem Ammo357MagnumJFPHandLoad ammocount
				set ammocount to 0
				endif

				;Ammo357Magnum
				set ammocount to player.GetItemCount Ammo38Special
				if ( ammocount > 0)
					Player.RemoveItem Ammo38Special ammocount 1
					XENO357BoxREF.AddItem Ammo38Special ammocount
				set ammocount to 0
				endif

				;Ammo40mmGrenade
				set ammocount to player.GetItemCount Ammo40mmGrenade
				if ( ammocount > 0)
					Player.RemoveItem Ammo40mmGrenade ammocount 1
					XENO40mmBoxREF.AddItem Ammo40mmGrenade ammocount
				set ammocount to 0
				endif

				;Ammo40mmGrenade
				set ammocount to player.GetItemCount Ammo40mmGrenadeIncendiary
				if ( ammocount > 0)
					Player.RemoveItem Ammo40mmGrenadeIncendiary ammocount 1
					XENO40mmBoxREF.AddItem Ammo40mmGrenadeIncendiary ammocount
				set ammocount to 0
				endif

				;Ammo4570
				set ammocount to player.GetItemCount Ammo4570
				if ( ammocount > 0)
					Player.RemoveItem Ammo4570 ammocount 1
					XENO4570BoxREF.AddItem Ammo4570 ammocount
				set ammocount to 0
				endif

				;Ammo4570
				set ammocount to player.GetItemCount Ammo4570HollowPoint 
				if ( ammocount > 0)
					Player.RemoveItem Ammo4570HollowPoint ammocount 1
					XENO4570BoxREF.AddItem Ammo4570HollowPoint ammocount
				set ammocount to 0
				endif

				;Ammo4570
				set ammocount to player.GetItemCount Ammo4570SWCHandLoad
				if ( ammocount > 0)
					Player.RemoveItem Ammo4570SWCHandLoad ammocount 1
					XENO4570BoxREF.AddItem Ammo4570SWCHandLoad ammocount
				set ammocount to 0
				endif

				;Ammo50MG
				set ammocount to player.GetItemCount Ammo50MG
				if ( ammocount > 0)
					Player.RemoveItem Ammo50MG ammocount 1
					XENO50MGBoxREF.AddItem Ammo50MG ammocount
				set ammocount to 0
				endif

				;Ammo50MG
				set ammocount to player.GetItemCount Ammo50MGArmorPiercing
				if ( ammocount > 0)
					Player.RemoveItem Ammo50MGArmorPiercing ammocount 1
					XENO50MGBoxREF.AddItem Ammo50MGArmorPiercing ammocount
				set ammocount to 0
				endif

				;Ammo50MG
				set ammocount to player.GetItemCount Ammo50MGHandLoad
				if ( ammocount > 0)
					Player.RemoveItem Ammo50MGHandLoad ammocount 1
					XENO50MGBoxREF.AddItem Ammo50MGHandLoad ammocount
				set ammocount to 0
				endif

				;Ammo50MG
				set ammocount to player.GetItemCount Ammo50MGIncendiary
				if ( ammocount > 0)
					Player.RemoveItem Ammo50MGIncendiary ammocount 1
					XENO50MGBoxREF.AddItem Ammo50MGIncendiary ammocount
				set ammocount to 0
				endif

				;Ammo9mm
				set ammocount to player.GetItemCount Ammo9mm
				if ( ammocount > 0)
					Player.RemoveItem Ammo9mm ammocount 1
					XENO9mmBoxREF.AddItem Ammo9mm ammocount
				set ammocount to 0
				endif

				;Ammo9mm
				set ammocount to player.GetItemCount Ammo9mmHollowPoint
				if ( ammocount > 0)
					Player.RemoveItem Ammo9mmHollowPoint ammocount 1
					XENO9mmBoxREF.AddItem Ammo9mmHollowPoint ammocount
				set ammocount to 0
				endif

				;Ammo9mm
				set ammocount to player.GetItemCount Ammo9mmP
				if ( ammocount > 0)
					Player.RemoveItem Ammo9mmP ammocount 1
					XENO9mmBoxREF.AddItem Ammo9mmP ammocount
				set ammocount to 0
				endif
			endif

			if (choice == 1)

				;FatMan
				set ammocount to player.GetItemCount AmmoFatMans
				if ( ammocount > 0)
					Player.RemoveItem AmmoFatMans ammocount 1
					XENOMNExpBoxREF.AddItem AmmoFatMans ammocount
				set ammocount to 0
				endif

				;Missile
				set ammocount to player.GetItemCount AmmoMissile
				if ( ammocount > 0)
					Player.RemoveItem AmmoMissile ammocount 1
					XENOMissExpBoxREF.AddItem AmmoMissile ammocount
				set ammocount to 0
				endif

				;Missile
				set ammocount to player.GetItemCount AmmoMissileHighExplosive
				if ( ammocount > 0)
					Player.RemoveItem AmmoMissileHighExplosive ammocount 1
					XENOMissExpBoxREF.AddItem AmmoMissileHighExplosive ammocount
				set ammocount to 0
				endif

				;Missile
				set ammocount to player.GetItemCount AmmoMissileHighVelocity
				if ( ammocount > 0)
					Player.RemoveItem AmmoMissileHighVelocity ammocount 1
					XENOMissExpBoxREF.AddItem AmmoMissileHighVelocity ammocount
				set ammocount to 0
				endif

				;FlamerFuel
				set ammocount to player.GetItemCount AmmoFlamerFuel
				if ( ammocount > 0)
					Player.RemoveItem AmmoFlamerFuel ammocount 1
					XENOFFExpBoxREF.AddItem AmmoFlamerFuel ammocount
				set ammocount to 0
				endif

				;FlamerFuel
				set ammocount to player.GetItemCount AmmoFlamerFuelHomemade
				if ( ammocount > 0)
					Player.RemoveItem AmmoFlamerFuelHomemade ammocount 1
					XENOFFExpBoxREF.AddItem AmmoFlamerFuelHomemade ammocount
				set ammocount to 0
				endif

				;FragGrenade
				set ammocount to player.GetItemCount WeapGrenadeFrag
				if ( ammocount > 0)
					Player.RemoveItem WeapGrenadeFrag ammocount 1
					XENOFragGExpBoxREF.AddItem WeapGrenadeFrag ammocount
				set ammocount to 0
				endif

				;PulseGrenade
				set ammocount to player.GetItemCount WeapGrenadePulse
				if ( ammocount > 0)
					Player.RemoveItem WeapGrenadePulse ammocount 1
					XENOPUExpBoxREF.AddItem WeapGrenadePulse ammocount
				set ammocount to 0
				endif

				;PlasmaGrenade
				set ammocount to player.GetItemCount WeapGrenadePlasma
				if ( ammocount > 0)
					Player.RemoveItem WeapGrenadePlasma ammocount 1
					XENOPlasmaGExpBoxREF.AddItem WeapGrenadePlasma ammocount
				set ammocount to 0
				endif

				;BottlecapMine
				set ammocount to player.GetItemCount WeapMineBottlecap
				if ( ammocount > 0)
					Player.RemoveItem WeapMineBottlecap ammocount 1
					XENOBMineExpBoxREF.AddItem WeapMineBottlecap ammocount
				set ammocount to 0
				endif

				;FragMine
				set ammocount to player.GetItemCount WeapMineFrag
				if ( ammocount > 0)
					Player.RemoveItem WeapMineFrag ammocount 1
					XENOFMineExpBoxREF.AddItem WeapMineFrag ammocount
				set ammocount to 0
				endif

				;PlasmaMine
				set ammocount to player.GetItemCount WeapMinePlasma
				if ( ammocount > 0)
					Player.RemoveItem WeapMinePlasma ammocount 1
					XENOPLMineExpBoxREF.AddItem WeapMinePlasma ammocount
				set ammocount to 0
				endif

				;PulseMine
				set ammocount to player.GetItemCount WeapMinePulse
				if ( ammocount > 0)
					Player.RemoveItem WeapMinePulse ammocount 1
					XENOPUMineExpBoxREF.AddItem WeapMinePulse ammocount
				set ammocount to 0
				endif

				;WeapNVDynamite
				set ammocount to player.GetItemCount WeapNVDynamite
				if ( ammocount > 0)
					Player.RemoveItem WeapNVDynamite ammocount 1
					XENODynExpBoxREF.AddItem WeapNVDynamite ammocount
				set ammocount to 0
				endif

				;WeapNVGrenadeFragHoly
				set ammocount to player.GetItemCount WeapNVGrenadeFragHoly
				if ( ammocount > 0)
					Player.RemoveItem WeapNVGrenadeFragHoly ammocount 1
					XENOFHExpBoxREF.AddItem WeapNVGrenadeFragHoly ammocount
				set ammocount to 0
				endif

				;WeapNVGrenadeIncendiary
				set ammocount to player.GetItemCount WeapNVGrenadeIncendiary
				if ( ammocount > 0)
					Player.RemoveItem WeapNVGrenadeIncendiary ammocount 1
					XENOIncExpBoxREF.AddItem WeapNVGrenadeIncendiary ammocount
				set ammocount to 0
				endif

				;WeapNVGrenadeStun
				set ammocount to player.GetItemCount WeapNVGrenadeStun
				if ( ammocount > 0)
					Player.RemoveItem WeapNVGrenadeStun ammocount 1
					XENOStunExpBoxREF.AddItem WeapNVGrenadeStun ammocount
				set ammocount to 0
				endif

				;WeapNVLongFuseDynamite
				set ammocount to player.GetItemCount WeapNVLongFuseDynamite
				if ( ammocount > 0)
					Player.RemoveItem WeapNVLongFuseDynamite ammocount 1
					XENOLFDynExpBoxREF.AddItem WeapNVLongFuseDynamite ammocount
				set ammocount to 0
				endif

				;WeapNVTimeBomb
				set ammocount to player.GetItemCount WeapNVTimeBomb
				if ( ammocount > 0)
					Player.RemoveItem WeapNVTimeBomb ammocount 1
					XENOTBombExpBoxREF.AddItem WeapNVTimeBomb ammocount
				set ammocount to 0
				endif

				;WeapNVC4PlasticExplosive
				set ammocount to player.GetItemCount WeapNVC4PlasticExplosive
				if ( ammocount > 0)
					Player.RemoveItem WeapNVC4PlasticExplosive ammocount 1
					XENOC4ExpBoxREF.AddItem WeapNVC4PlasticExplosive ammocount
				set ammocount to 0
				endif

				;WeapNVDetonator
				set ammocount to player.GetItemCount WeapNVDetonator
				if ( ammocount > 0)
					Player.RemoveItem WeapNVDetonator ammocount 1
					XENOC4ExpBoxREF.AddItem WeapNVDetonator ammocount
				set ammocount to 0
				endif

				;WeapNVMinePowderCharge
				set ammocount to player.GetItemCount WeapNVMinePowderCharge
				if ( ammocount > 0)
					Player.RemoveItem WeapNVMinePowderCharge ammocount 1
					XENOPChargeBoxREF.AddItem WeapNVMinePowderCharge ammocount
				set ammocount to 0
				endif
		endif

		if choice == 2
			;exit
		endif
	endif
end

 

can anyone help me understand what im doing wrong?

Link to comment
Share on other sites

Try adding this tool to your GECK

http://www.newvegasnexus.com/downloads/file.php?id=41642

 

It adds error messages to the GECK especially involving scripting. There is a very good chance that it will tell you exactly what is wrong and even give the errors line by line. It will give you the first error and what line it is located at. When you fix that error try to save again and it will move to the next error if there is one.

 

The messages are generally triggered by trying to save the script. Hit save and if it hits a problem it will generate the error message. Some messages are also generated simply by typing in the wrong thing into a script also. Extremely useful tool that can save you much head pounding.

Edited by deu58
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...