Monticapone Posted November 28, 2010 Share Posted November 28, 2010 I made an AmmoSorter Script and for some reason it just wont work...Here is my script:ScriptName MontiAmmoSorterScript short awaitingInput short buttonPressed short ammocount begin OnActivate if ( isActionRef Player ) set awaitingInput to 1 ShowMessage MontiAmmoSorterMessage endif end begin GameMode if (awaitingInput) Set buttonPressed to GetButtonPressed if ( buttonPressed > -1 ) set awaitingInput to 0 ;10mm Round** ;10mm* set ammocount to player.GetItemCount Ammo10mm if ( ammocount > 0) Player.RemoveItem Ammo10mm ammocount 1 10mmAmmoSort.AddItem Ammo10mm ammocount set ammocount to 0 endif ;10mmHollowPoint* set ammocount to player.GetItemCount Ammo10mmHollowPoint if ( ammocount > 0) Player.RemoveItem Ammo10mmHollowPoint ammocount 1 10mmAmmoSort.AddItem Ammo10mmHollowPoint ammocount set ammocount to 0 endif ;10mmJHPHandLoad* set ammocount to player.GetItemCount Ammo10mmJHPHandLoad if ( ammocount > 0) Player.RemoveItem Ammo10mmJHPHandLoad ammocount 1 10mmAmmoSort.AddItem Ammo10mmJHPHandLoad ammocount set ammocount to 0 endif ;12.7mm Round** ;127mm* set ammocount to player.GetItemCount Ammo127mm if ( ammocount > 0) Player.RemoveItem Ammo127mm ammocount 1 127mmAmmoSort.AddItem Ammo127mm ammocount set ammocount to 0 endif ;127mmHollowPoint* set ammocount to player.GetItemCount Ammo127mmHollowPoint if ( ammocount > 0) Player.RemoveItem Ammo127mmHollowPoint ammocount 1 127mmAmmoSort.AddItem Ammo127mmHollowPoint ammocount set ammocount to 0 endif ;12GaugeShell** ;12Gauge* set ammocount to player.GetItemCount Ammo12Ga if ( ammocount > 0) Player.RemoveItem Ammo12Ga ammocount 1 12GaugeAmmoSort.AddItem Ammo12Ga ammocount set ammocount to 0 endif ;12GaugeBeanBag* set ammocount to player.GetItemCount Ammo12GaBeanBag if ( ammocount > 0) Player.RemoveItem Ammo12GaBeanBag ammocount 1 12GaugeAmmoSort.AddItem Ammo12GaBeanBag ammocount set ammocount to 0 endif ;12GaugeCoinShot* set ammocount to player.GetItemCount Ammo12GaCoinShot if ( ammocount > 0) Player.RemoveItem Ammo12GaCoinShot ammocount 1 12GaugeAmmoSort.AddItem Ammo12GaCoinShot ammocount set ammocount to 0 endif ;12GaugeMagnum* set ammocount to player.GetItemCount Ammo20GaMagnum if ( ammocount > 0) Player.RemoveItem Ammo20GaMagnum ammocount 1 12GaugeAmmoSort.AddItem Ammo20GaMagnum ammocount set ammocount to 0 endif ;12GaugeSlug* set ammocount to player.GetItemCount Ammo20GaSlug if ( ammocount > 0) Player.RemoveItem Ammo20GaSlug ammocount 1 12GaugeAmmoSort.AddItem Ammo20GaSlug ammocount set ammocount to 0 endif ;20GaugeShells** ;20Gauge* set ammocount to player.GetItemCount Ammo20Ga if ( ammocount > 0) Player.RemoveItem Ammo20Ga ammocount 1 20GaugeAmmoSort.AddItem Ammo20Ga ammocount set ammocount to 0 endif ;20GaugeMagnum* set ammocount to player.GetItemCount Ammo20GaMagnum if ( ammocount > 0) Player.RemoveItem Ammo20GaMagnum ammocount 1 20GaugeAmmoSort.AddItem Ammo20GaMagnum ammocount set ammocount to 0 endif ;20GaugeSlug* set ammocount to player.GetItemCount Ammo20GaSlug if ( ammocount > 0) Player.RemoveItem Ammo20GaSlug ammocount 1 20GaugeAmmoSort.AddItem Ammo20GaSlug ammocount set ammocount to 0 endif ;22LR Round** ;22LR* set ammocount to player.GetItemCount Ammo22LR if ( ammocount > 0) Player.RemoveItem Ammo22LR ammocount 1 22LRAmmoSort.AddItem Ammo22LR ammocount set ammocount to 0 endif ;22LRHollowPoint* set ammocount to player.GetItemCount Ammo22LRHollowPoint if ( ammocount > 0) Player.RemoveItem Ammo22LRHollowPoint ammocount 1 22LRAmmoSort.AddItem Ammo22LRHollowPoint ammocount set ammocount to 0 endif ;22LRPlinking* set ammocount to player.GetItemCount Ammo22LRPlinking if ( ammocount > 0) Player.RemoveItem Ammo22LRPlinking ammocount 1 22LRAmmoSort.AddItem Ammo22LRPlinking ammocount set ammocount to 0 endif ;308 Round** ;308ArmorPiercing* set ammocount to player.GetItemCount Ammo308ArmorPiercing if ( ammocount > 0) Player.RemoveItem Ammo308ArmorPiercing ammocount 1 308Ammosort.AddItem Ammo308ArmorPiercing ammocount set ammocount to 0 endif ;308* set ammocount to player.GetItemCount Ammo308 if ( ammocount > 0) Player.RemoveItem Ammo308 ammocount 1 308Ammosort.AddItem Ammo308 ammocount set ammocount to 0 endif ;308HollowPoint* set ammocount to player.GetItemCount Ammo308HollowPoint if ( ammocount > 0) Player.RemoveItem Ammo308HollowPoint ammocount 1 308Ammosort.AddItem Ammo308HollowPoint ammocount set ammocount to 0 endif ;308JFP* set ammocount to player.GetItemCount Ammo308JSPHandLoad if ( ammocount > 0) Player.RemoveItem Ammo308JSPHandLoad ammocount 1 308Ammosort.AddItem Ammo308JSPHandLoad ammocount set ammocount to 0 endif ;357 Magnum Round** ;357Magnum* set ammocount to player.GetItemCount Ammo357Magnum if ( ammocount > 0) Player.RemoveItem Ammo357Magnum ammocount 1 357MagnumAmmoSort.AddItem Ammo357Magnum ammocount set ammocount to 0 endif ;357MagnumHollowPoint* set ammocount to player.GetItemCount Ammo357MagnumHollowPoint if ( ammocount > 0) Player.RemoveItem Ammo357MagnumHollowPoint ammocount 1 357MagnumAmmosort.AddItem Ammo357MagnumHollowPoint ammocount set ammocount to 0 endif ;357MagnumJFP* set ammocount to player.GetItemCount Ammo357MagnumJFPHandLoad if ( ammocount > 0) Player.RemoveItem Ammo357MagnumJFPHandLoad ammocount 1 357MagnumAmmosort.AddItem Ammo357MagnumJFPHandLoad ammocount set ammocount to 0 endif ;375Magnum,38Special* set ammocount to player.GetItemCount Ammo38Special if ( ammocount > 0) Player.RemoveItem Ammo38Special ammocount 1 357MagnumAmmosort.AddItem Ammo38Special ammocount set ammocount to 0 endif ;44 Magnum Round** ;44Magnum* set ammocount to player.GetItemCount Ammo44magnum if ( ammocount > 0) Player.RemoveItem Ammo44magnum ammocount 1 44MagnumAmmoSort.AddItem Ammo44magnum ammocount set ammocount to 0 endif ;44MagnumHollowPoint* set ammocount to player.GetItemCount Ammo44MagnumHollowPoint if ( ammocount > 0) Player.RemoveItem Ammo44MagnumHollowPoint ammocount 1 44MagnumAmmoSort.AddItem Ammo44MagnumHollowPoint ammocount set ammocount to 0 endif ;44MagnumSWC* set ammocount to player.GetItemCount Ammo44MagnumSWCHandLoad if ( ammocount > 0) Player.RemoveItem Ammo44MagnumSWCHandLoad ammocount 1 44MagnumAmmoSort.AddItem Ammo44MagnumSWCHandLoad ammocount set ammocount to 0 endif ;44MagnumSpecial* set ammocount to player.GetItemCount Ammo44Special if ( ammocount > 0) Player.RemoveItem Ammo44Special ammocount 1 44MagnumAmmoSort.AddItem Ammo44Special ammocount set ammocount to 0 endif ;45-70 Round** ;4570* set ammocount to player.GetItemCount Ammo4570 if ( ammocount > 0) Player.RemoveItem Ammo4570 ammocount 1 4570AmmoSort.AddItem Ammo4570 ammocount set ammocount to 0 endif ;4570HollowPoint* set ammocount to player.GetItemCount Ammo4570HollowPoint if ( ammocount > 0) Player.RemoveItem Ammo4570HollowPoint ammocount 1 4570AmmoSort.AddItem Ammo4570HollowPoint ammocount set ammocount to 0 endif ;4570SWC* set ammocount to player.GetItemCount Ammo4570SWCHandLoad if ( ammocount > 0) Player.RemoveItem Ammo4570SWCHandLoad ammocount 1 4570AmmoSort.AddItem Ammo4570SWCHandLoad ammocount set ammocount to 0 endif ;50 MG Round** ;50MG* set ammocount to player.GetItemCount Ammo50MG if ( ammocount > 0) Player.RemoveItem Ammo50MG ammocount 1 50MGAmmoSort.AddItem Ammo50MG ammocount set ammocount to 0 endif ;50MGArmorPiercing* set ammocount to player.GetItemCount Ammo50MGArmorPiercing if ( ammocount > 0) Player.RemoveItem Ammo50MGArmorPiercing ammocount 1 50MGAmmoSort.AddItem Ammo50MGArmorPiercing ammocount set ammocount to 0 endif ;50MGHandLoad* set ammocount to player.GetItemCount Ammo50MGHandLoad if ( ammocount > 0) Player.RemoveItem Ammo50MGHandLoad ammocount 1 50MGAmmoSort.AddItem Ammo50MGHandLoad ammocount set ammocount to 0 endif ;50MGIncendiary* set ammocount to player.GetItemCount Ammo50MGIncendiary if ( ammocount > 0) Player.RemoveItem Ammo50MGIncendiary ammocount 1 50MGAmmoSort.AddItem Ammo50MGIncendiary ammocount set ammocount to 0 endif ;556mm Round** ;556mm* set ammocount to player.GetItemCount Ammo556mm if ( ammocount > 0) Player.RemoveItem Ammo556mm ammocount 1 556mmAmmoSort.AddItem Ammo556mm ammocount set ammocount to 0 endif ;556mmArmorPiercing* set ammocount to player.GetItemCount Ammo556mmArmorPiercing if ( ammocount > 0) Player.RemoveItem Ammo556mmArmorPiercing ammocount 1 556mmAmmoSort.AddItem Ammo556mmArmorPiercing ammocount set ammocount to 0 endif ;556mmHollowPoint* set ammocount to player.GetItemCount Ammo556mmHollowPoint if ( ammocount > 0) Player.RemoveItem Ammo556mmHollowPoint ammocount 1 556mmAmmoSort.AddItem Ammo556mmHollowPoint ammocount set ammocount to 0 endif ;556mmRobot* set ammocount to player.GetItemCount Ammo556mmRobot if ( ammocount > 0) Player.RemoveItem Ammo556mmRobot ammocount 1 556mmAmmoSort.AddItem Ammo556mmRobot ammocount set ammocount to 0 endif ;556mmSurplus* set ammocount to player.GetItemCount Ammo556mmSurplus if ( ammocount > 0) Player.RemoveItem Ammo556mmSurplus ammocount 1 556mmAmmoSort.AddItem Ammo556mmSurplus ammocount set ammocount to 0 endif ;223* set ammocount to player.GetItemCount Ammo223 if ( ammocount > 0) Player.RemoveItem Ammo223 ammocount 1 556mmAmmoSort.AddItem Ammo223 ammocount set ammocount to 0 endif ;5mm Round** ;5mm* set ammocount to player.GetItemCount Ammo5mm if ( ammocount > 0) Player.RemoveItem Ammo5mm ammocount 1 5mmAmmoSort.AddItem Ammo5mm ammocount set ammocount to 0 endif ;5mmArmorPiercing* set ammocount to player.GetItemCount Ammo5mmArmorPiercing if ( ammocount > 0) Player.RemoveItem Ammo5mmArmorPiercing ammocount 1 5mmAmmoSort.AddItem Ammo5mmArmorPiercing ammocount set ammocount to 0 endif ;5mmHollowPoint* set ammocount to player.GetItemCount Ammo5mmHollowPoint if ( ammocount > 0) Player.RemoveItem Ammo5mmHollowPoint ammocount 1 5mmAmmoSort.AddItem Ammo5mmHollowPoint ammocount set ammocount to 0 endif ;5mmRobot* set ammocount to player.GetItemCount Ammo5mmRobot if ( ammocount > 0) Player.RemoveItem Ammo5mmRobot ammocount 1 5mmAmmoSort.AddItem Ammo5mmRobot ammocount set ammocount to 0 endif ;5mmSurplus* set ammocount to player.GetItemCount Ammo5mmSurplus if ( ammocount > 0) Player.RemoveItem Ammo5mmSurplus ammocount 1 5mmAmmoSort.AddItem Ammo5mmSurplus ammocount set ammocount to 0 endif ;9mm Round** ;9mm* set ammocount to player.GetItemCount Ammo9mm if ( ammocount > 0) Player.RemoveItem Ammo9mm ammocount 1 9mmAmmoSort.AddItem Ammo9mm ammocount set ammocount to 0 endif ;9mmHollowPoint* set ammocount to player.GetItemCount Ammo9mmHollowPoint if ( ammocount > 0) Player.RemoveItem Ammo9mmHollowPoint ammocount 1 9mmAmmoSort.AddItem Ammo9mmHollowPoint ammocount set ammocount to 0 endif ;9mmP* set ammocount to player.GetItemCount Ammo9mmP if ( ammocount > 0) Player.RemoveItem Ammo9mmP ammocount 1 9mmAmmoSort.AddItem Ammo9mmP ammocount set ammocount to 0 endif ;9mmRobot* set ammocount to player.GetItemCount Ammo9mmRobot if ( ammocount > 0) Player.RemoveItem Ammo9mmRobot ammocount 1 9mmAmmoSort.AddItem Ammo9mmRobot ammocount set ammocount to 0 endif ;BB Pellets** ;BB* set ammocount to player.GetItemCount AmmoBB if ( ammocount > 0) Player.RemoveItem AmmoBB ammocount 1 BBAmmoSort.AddItem AmmoB ammocount set ammocount to 0 endif ;ThrowingWeapons** ;ThrowingHatchet* set ammocount to player.GetItemCount WeapNVThrowingHatchet if ( ammocount > 0) Player.RemoveItem WeapNVThrowingHatchet ammocount 1 ThrowingWeaponsAmmoSort.AddItem WeapNVThrowingHatchet ammocount set ammocount to 0 endif ;ThrowingKnife* set ammocount to player.GetItemCount WeapNVThrowingKnife if ( ammocount > 0) Player.RemoveItem WeapNVThrowingKnife ammocount 1 ThrowingWeaponsAmmoSort.AddItem WeapNVThrowingKnife ammocount set ammocount to 0 endif ;ThrowingSpear* set ammocount to player.GetItemCount WeapNVThrowingSpear if ( ammocount > 0) Player.RemoveItem WeapNVThrowingSpear ammocount 1 ThrowingWeaponsAmmoSort.AddItem WeapNVThrowingSpear ammocount set ammocount to 0 endif endif if ( buttonPressed == 1 ) ;Fatman Missiles** ;Fatman* set ammocount to player.GetItemCount AmmoFatMans if ( ammocount > 0) Player.RemoveItem AmmoFatMans ammocount 1 FatmanAmmoSort.AddItem AmmoFatMans ammocount set ammocount to 0 endif ;Missiles** ;Missile* set ammocount to player.GetItemCount AmmoMissile if ( ammocount > 0) Player.RemoveItem AmmoMissile ammocount 1 MissileAmmoSort.AddItem AmmoMissile ammocount set ammocount to 0 endif ;MissileHighExplosive* set ammocount to player.GetItemCount AmmoMissileHighExplosive if ( ammocount > 0) Player.RemoveItem AmmoMissileHighExplosive ammocount 1 MissileAmmoSort.AddItem AmmoMissileHighExplosive ammocount set ammocount to 0 endif ;MissileHighVelocity* set ammocount to player.GetItemCount AmmoMissileHighVelocity if ( ammocount > 0) Player.RemoveItem AmmoMissileHighVelocity ammocount 1 MissileAmmoSort.AddItem AmmoMissileHighVelocity ammocount set ammocount to 0 endif ;MissileRobot* set ammocount to player.GetItemCount AmmoMissileRobot if ( ammocount > 0) Player.RemoveItem AmmoMissileRobot ammocount 1 MissileAmmoSort.AddItem AmmoMissileRobot ammocount set ammocount to 0 endif ;Flamer Fuel** ;Flamer* set ammocount to player.GetItemCount AmmoFlamerFuel if ( ammocount > 0) Player.RemoveItem AmmoFlamerFuel ammocount 1 FlamerAmmoSort.AddItem AmmoFlamerFuel ammocount set ammocount to 0 endif ;FlamerHomemade* set ammocount to player.GetItemCount AmmoFlamerFuelHomemade if ( ammocount > 0) Player.RemoveItem AmmoFlamerFuelHomemade ammocount 1 FlamerAmmoSort.AddItem AmmoFlamerFuelHomemade ammocount set ammocount to 0 endif ;FlamerRobot* set ammocount to player.GetItemCount AmmoFlamerFuelRobot if ( ammocount > 0) Player.RemoveItem AmmoFlamerFuelRobot ammocount 1 FlamerAmmoSort.AddItem AmmoFlamerFuelRobot ammocount set ammocount to 0 endif ;Artillery Shell ;ammoNellisArtillery* set ammocount to player.GetItemCount ammoNellisArtillery if ( ammocount > 0) Player.RemoveItem ammoNellisArtillery ammocount 1 MissileAmmoSort.AddItem ammoNellisArtillery ammocount set ammocount to 0 endif ;Grenades** ;25mmGrenade* set ammocount to player.GetItemCount Ammo25mmGrenade if ( ammocount > 0) Player.RemoveItem Ammo25mmGrenade ammocount 1 GrenadeAmmoSort.AddItem Ammo25mmGrenade ammocount set ammocount to 0 endif ;25mmGrenadeHighExplosive* set ammocount to player.GetItemCount Ammo25mmGrenadeHighExplosive if ( ammocount > 0) Player.RemoveItem Ammo25mmGrenadeHighExplosive ammocount 1 GrenadeAmmoSort.AddItem Ammo25mmGrenadeHighExplosive ammocount set ammocount to 0 endif ;40mmGrenade* set ammocount to player.GetItemCount Ammo40mmGrenade if ( ammocount > 0) Player.RemoveItem Ammo40mmGrenade ammocount 1 GrenadeAmmoSort.AddItem Ammo40mmGrenade ammocount set ammocount to 0 endif ;40mmGrenadeIncendiary* set ammocount to player.GetItemCount Ammo40mmGrenadeIncendiary if ( ammocount > 0) Player.RemoveItem Ammo40mmGrenadeIncendiary ammocount 1 GrenadeAmmoSort.AddItem Ammo40mmGrenadeIncendiary ammocount set ammocount to 0 endif ;PulseGrenade* set ammocount to player.GetItemCount WeapGrenadePulse if ( ammocount > 0) Player.RemoveItem WeapGrenadePulse ammocount 1 GrenadeAmmoSort.AddItem WeapGrenadePulse ammocount set ammocount to 0 endif ;PlasmaGrenade* set ammocount to player.GetItemCount WeapGrenadePlasma if ( ammocount > 0) Player.RemoveItem WeapGrenadePlasma ammocount 1 GrenadeAmmoSort.AddItem WeapGrenadePlasma ammocount set ammocount to 0 endif ;GrenadeMisfits* set ammocount to player.GetItemCount WeapGrenadeFragMisfits if ( ammocount > 0) Player.RemoveItem WeapGrenadeFragMisfits ammocount 1 GrenadeAmmoSort.AddItem WeapGrenadeFragMisfits ammocount set ammocount to 0 endif ;GasGrenade* set ammocount to player.GetItemCount WeapGrenadeGas if ( ammocount > 0) Player.RemoveItem WeapGrenadeGas ammocount 1 GrenadeAmmoSort.AddItem WeapGrenadeGas ammocount set ammocount to 0 endif ;FragGrenade* set ammocount to player.GetItemCount WeapGrenadeFrag if ( ammocount > 0) Player.RemoveItem WeapGrenadeFrag ammocount 1 GrenadeAmmoSort.AddItem WeapGrenadeFrag ammocount set ammocount to 0 endif ;Dynamite* set ammocount to player.GetItemCount WeapNVDynamite if ( ammocount > 0) Player.RemoveItem WeapNVDynamite ammocount 1 GrenadeAmmoSort.AddItem WeapNVDynamite ammocount set ammocount to 0 endif ;DynamiteNoDrop* set ammocount to player.GetItemCount WeapNVDynamiteNoDrop if ( ammocount > 0) Player.RemoveItem WeapNVDynamiteNoDrop ammocount 1 GrenadeAmmoSort.AddItem WeapNVDynamiteNoDrop ammocount set ammocount to 0 endif ;HolyFragGrenade* set ammocount to player.GetItemCount WeapNVGrenadeFragHoly if ( ammocount > 0) Player.RemoveItem WeapNVGrenadeFragHoly ammocount 1 GrenadeAmmoSort.AddItem WeapNVGrenadeFragHoly ammocount set ammocount to 0 endif ;FragGrenadeIncendiary* set ammocount to player.GetItemCount WeapNVGrenadeIncendiary if ( ammocount > 0) Player.RemoveItem WeapNVGrenadeIncendiary ammocount 1 GrenadeAmmoSort.AddItem WeapNVGrenadeIncendiary ammocount set ammocount to 0 endif ;StunGrenade* set ammocount to player.GetItemCount WeapNVGrenadeStun if ( ammocount > 0) Player.RemoveItem WeapNVGrenadeStun ammocount 1 GrenadeAmmoSort.AddItem WeapNVGrenadeStun ammocount set ammocount to 0 endif ;LongFuseDynamite* set ammocount to player.GetItemCount WeapNVLongFuseDynamite if ( ammocount > 0) Player.RemoveItem WeapNVLongFuseDynamite ammocount 1 GrenadeAmmoSort.AddItem WeapNVLongFuseDynamite ammocount set ammocount to 0 endif ;Mines** ;BottlecapMine* set ammocount to player.GetItemCount WeapMineBottlecap if ( ammocount > 0) Player.RemoveItem WeapMineBottlecap ammocount 1 MineAmmoSort.AddItem WeapMineBottlecap ammocount set ammocount to 0 endif ;C4PlasticExplosive* set ammocount to player.GetItemCount WeapNVC4PlasticExplosive if ( ammocount > 0) Player.RemoveItem WeapNVC4PlasticExplosive ammocount 1 MineAmmoSort.AddItem WeapNVC4PlasticExplosive ammocount set ammocount to 0 endif ;TimeBomb* set ammocount to player.GetItemCount WeapNVTimeBomb if ( ammocount > 0) Player.RemoveItem WeapNVTimeBomb ammocount 1 MineAmmoSort.AddItem WeapNVTimeBomb ammocount set ammocount to 0 endif ;FragMine* set ammocount to player.GetItemCount WeapMineFrag if ( ammocount > 0) Player.RemoveItem WeapMineFrag ammocount 1 MineAmmoSort.AddItem WeapMineFrag ammocount set ammocount to 0 endif ;PlasmaMine* set ammocount to player.GetItemCount WeapMinePlasma if ( ammocount > 0) Player.RemoveItem WeapMinePlasma ammocount 1 MineAmmoSort.AddItem WeapMinePlasma ammocount set ammocount to 0 endif ;PulseMine* set ammocount to player.GetItemCount WeapMinePulse if ( ammocount > 0) Player.RemoveItem WeapMinePulse ammocount 1 MineAmmoSort.AddItem WeapMinePulse ammocount set ammocount to 0 endif ;PowderCharge* set ammocount to player.GetItemCount WeapNVMinePowderCharge if ( ammocount > 0) Player.RemoveItem WeapNVMinePowderCharge ammocount 1 MineAmmoSort.AddItem WeapNVMinePowderCharge ammocount set ammocount to 0 endif endif if ( buttonPressed == 2 ) ;Alien Powercell** ;AlienPowerCell* set ammocount to player.GetItemCount AmmoAlienPowerCell if ( ammocount > 0) Player.RemoveItem AmmoAlienPowerCell ammocount 1 AlienCellAmmoSort.AddItem AmmoAlienPowerCell ammocount set ammocount to 0 endif ;Electron Charge Packs** ;Electron* set ammocount to player.GetItemCount AmmoElectronChargePack if ( ammocount > 0) Player.RemoveItem AmmoElectronChargePack ammocount 1 ElectronAmmoSort.AddItem AmmoElectronChargePack ammocount set ammocount to 0 endif ;ElectronBulk* set ammocount to player.GetItemCount AmmoElectronChargePackBulk if ( ammocount > 0) Player.RemoveItem AmmoElectronChargePackBulk ammocount 1 ElectronAmmoSort.AddItem AmmoElectronChargePackBulk ammocount set ammocount to 0 endif ;ElectronMaxCharge* set ammocount to player.GetItemCount AmmoElectronChargePackMaxCharge if ( ammocount > 0) Player.RemoveItem AmmoElectronChargePackMaxCharge ammocount 1 ElectronAmmoSort.AddItem AmmoElectronChargePackMaxCharge ammocount set ammocount to 0 endif ;ElectronOverCharge* set ammocount to player.GetItemCount AmmoElectronChargePackOverCharge if ( ammocount > 0) Player.RemoveItem AmmoElectronChargePackOverCharge ammocount 1 ElectronAmmoSort.AddItem AmmoElectronChargePackOverCharge ammocount set ammocount to 0 endif ;ElectronRobot* set ammocount to player.GetItemCount AmmoElectronChargePackRobot if ( ammocount > 0) Player.RemoveItem AmmoElectronChargePackRobot ammocount 1 ElectronAmmoSort.AddItem AmmoElectronChargePackRobot ammocount set ammocount to 0 endif ;Small Energy Cell** ;SmallEnergy* set ammocount to player.GetItemCount AmmoSmallEnergyCell if ( ammocount > 0) Player.RemoveItem AmmoSmallEnergyCell ammocount 1 SmallEnergyAmmoSort.AddItem AmmoSmallEnergyCell ammocount set ammocount to 0 endif ;SmallEnergyBulk* set ammocount to player.GetItemCount AmmoSmallEnergyCellBulk if ( ammocount > 0) Player.RemoveItem AmmoSmallEnergyCellBulk ammocount 1 SmallEnergyAmmoSort.AddItem AmmoSmallEnergyCellBulk ammocount set ammocount to 0 endif ;SmallEnergyMaxCharge* set ammocount to player.GetItemCount AmmoSmallEnergyCellMaxCharge if ( ammocount > 0) Player.RemoveItem AmmoSmallEnergyCellMaxCharge ammocount 1 SmallEnergyAmmoSort.AddItem AmmoSmallEnergyCellMaxCharge ammocount set ammocount to 0 endif ;SmallEnergyOverCharge* set ammocount to player.GetItemCount AmmoSmallEnergyCellOverCharge if ( ammocount > 0) Player.RemoveItem AmmoSmallEnergyCellOverCharge ammocount 1 SmallEnergyAmmoSort.AddItem AmmoSmallEnergyCellOverCharge ammocount set ammocount to 0 endif ;SmallEnergyRobot* set ammocount to player.GetItemCount AmmoSmallEnergyCellRobot if ( ammocount > 0) Player.RemoveItem AmmoSmallEnergyCellRobot ammocount 1 SmallEnergyAmmoSort.AddItem AmmoSmallEnergyCellRobot ammocount set ammocount to 0 endif ;SmallEnergyTurret* set ammocount to player.GetItemCount AmmoSmallEnergyCellTurret if ( ammocount > 0) Player.RemoveItem AmmoSmallEnergyCellTurret ammocount 1 SmallEnergyAmmoSort.AddItem AmmoSmallEnergyCellTurret ammocount set ammocount to 0 endif endif endif end  The GECK tells me the following:Line 26:Script Command "10mmAmmoSort.Additem" not found. Why is that? What is wrong with my script? :mellow: Link to comment Share on other sites More sharing options...
Interfer0 Posted November 28, 2010 Share Posted November 28, 2010 Do those containers already exist in game? and is that a Unique ID for a specific container. If not it won't work. Link to comment Share on other sites More sharing options...
Monticapone Posted November 28, 2010 Author Share Posted November 28, 2010 Yepp, the containers exist, the base objects themselves are unique and every one has an unique RefID... Link to comment Share on other sites More sharing options...
Interfer0 Posted November 28, 2010 Share Posted November 28, 2010 Is the script pointing to that unique RefID? Link to comment Share on other sites More sharing options...
Monticapone Posted November 28, 2010 Author Share Posted November 28, 2010 Of course ;)10mmAmmoSort is the name of the container (the refID) Link to comment Share on other sites More sharing options...
Interfer0 Posted November 28, 2010 Share Posted November 28, 2010 Cipscis Script Validator doesn't return errors, so I think its a naming problem. Link to comment Share on other sites More sharing options...
Monticapone Posted November 28, 2010 Author Share Posted November 28, 2010 (edited) Hmmm...I checked the naming three times now, I copy/pasted it....Damn thats so weird :SI am wondering why the GECK tells me that "10mmAmmoSort.Additem" is not found, because additem is not part of the RefID, but the command...Is there something wrong with punctuation or so? Edited November 28, 2010 by Monticapone Link to comment Share on other sites More sharing options...
Interfer0 Posted November 28, 2010 Share Posted November 28, 2010 Are the containers checked as persistent references? Link to comment Share on other sites More sharing options...
Monticapone Posted November 28, 2010 Author Share Posted November 28, 2010 Yepp....:S Link to comment Share on other sites More sharing options...
Ez0n3 Posted November 28, 2010 Share Posted November 28, 2010 (edited) There's an issue with starting object names with numbers, maybe that's what you're up against.Instead of "10mmAmmoSort", try "Ammo10mmSort". Edited November 28, 2010 by Ez0n3 Link to comment Share on other sites More sharing options...
Recommended Posts