Jump to content

Need Help on why script won't save


Lines22

Recommended Posts

So I'm trying to modify the toaster to accept other appliences. But it will not save. I think i have an issue in syntax maybe and it's not telling me. This is what I've got

 

 

SCN NVDLC03SinkToasterOfDoomSCRIPT


; Talking Activator script for Toaster
; tls 01/19/2011
; SPW 02/24/11 - Adding vars for HQ Buddy quest
; SPW 03/01/11 - Removing note from player's inventory after turn in.
; TLS 05/02/2011 - Setting toaster to only upgrade one Saturnite Power Fist at a time.


Short bToasterUnlocked ; 1 = Player has turned in the unlock holodisk: "NVDLC03HQBuddyToasterNOTE".

Short bTalkAfterMessage ; Variable set in onactivate block to start dialogue in the gamemode block (so the Player doesn't have to "re-activate" after exiting a message box pop-up.
Short bAwaitingInput ; Message box variable.
Short nButton ; Which message box option the player has pressed.
Short nToasterPostwarCount
Short nToasterPrewarCount
Short nToasterCount
Short nCameraCount
Short nIronCount
Short nHotPlateCount
Short nLeafBlowerCount
Short nVacuumCleanerCount
Short nWoodChipperCount
Short nApplianceTotal
Short nMicrofusionCellReturned
Short nSmallEnergyCellReturned
Short bLaunchMenu


BEGIN OnLoad

SetTalkingActivatorActor NVDLC03SinkToasterTalkerREF;

END


BEGIN OnActivate

If (IsActionRef Player == 1)
If ( bToasterUnlocked == 1 )
If ( NVDLC03DialogueHQBuddies.bBuddiesTalk == 0 )
ShowMessage NVDLC03HQBuddiesNoTalkMSG;
;If ( Player.GetItemCount ToasterPostwar >= 1 || Player.GetItemCount ToasterPrewar >= 1 || Player.GetItemCount NVDLC03WeapSaturniteFist >= 1 ) ; 4/1/11 ETB - Changed to formlist
If ( Player.GetItemCount NVDLC03HQBuddiesToasterAllApplianceLIST >= 1 )
Set bAwaitingInput to 1;
ShowMessage NVDLC03HQToasterMSG;
Else
ShowMessage NVDLC03HQToasterNoItemsMSG;
Endif
Elseif ( NVDLC03DialogueHQBuddies.bBuddiesTalk == 1 )
Set bTalkAfterMessage to 1;
Endif
Else
If ( Player.GetHasNote NVDLC03HQBuddyToasterNOTE== 0 )
ShowMessage NVDLC03HQBuddyLockedMSG;
Elseif ( Player.GetHasNote NVDLC03HQBuddyToasterNOTE== 1 )
ShowMessage NVDLC03HQBuddyUnlockMSG;
Set bToasterUnlocked to 1;
Player.RemoveNote NVDLC03HQBuddyToasterNOTE; SPW
Set NVDLC03HQBuddy.iToaster to 1; SPW
Set NVDLC03DialogueHQBuddies.bToasterUnlocked to 1;
IncrementScriptedChallenge NVDLC03AchievementMakingFriends;
Set bTalkAfterMessage to 1;
Endif
Endif
Endif

END; onactivate


BEGIN GameMode

If ( bTalkAfterMessage == 1 )
Set bTalkAfterMessage to 0;
;SetTalkingActivatorActor NVDLC03SinkToasterTalkerREF;
Activate;
Endif

If ( bLaunchMenu == 1 )
Set bLaunchMenu to 0;
Set bAwaitingInput to 1;
ShowMessage NVDLC03HQToasterMSG;
Endif

END; gamemode


BEGIN MenuMode 1001

If ( bAwaitingInput == 1 )
Set nButton to GetButtonPressed;

If ( nButton > -1 )
Set bAwaitingInput to 0;

; ------------------------------------------------------------------- BUTTON 0 ---------------------------------------------- \/ ; "Do Nothing"
If ( nButton == 0 )
Set nButton to -1;
Return;
; ------------------------------------------------------------------- BUTTON 1 ---------------------------------------------- \/ ; "Process Toasters and Applicances"
Elseif ( nButton == 1 )
Set nButton to -1;
; --------------------------- Toasters ------------------------ \/
Set nToasterPostwarCount to Player.GetItemCount ToasterPostwar;
Set nToasterPrewarCount to Player.GetItemCount ToasterPrewar;
Set nToasterCount to ( nToasterPostwarCount + nToasterPrewarCount );
; --------------------------- Camera -------------------------- \/
Set nCameraCount to Player.GetItemCount Camera;
; --------------------------- Iron -------------------------------- \/
Set nIronCount to Player.GetItemCount Iron;
; --------------------------- Hot Plate ------------------------ \/
Set nHotPlateCount to Player.GetItemCount HotPlate;
; --------------------------- Leaf Blower --------------------\/
Set nLeafBlowerCount to Player.GetItemCount LeafBlower;
; --------------------------- Vacuum Cleaner -------------\/
Set nVacuumCleanerCount to Player.GetItemCount VacuumCleaner;
; --------------------------- Wood Chipper ----------------\/
Set nWoodChipperCount to Player.GetItemCount WoodChipper;
; --------------------------- Total Appliances ------------ \/
Set nApplianceTotal to ( nToasterCount + nCameraCount + nIronCount + nHotPlateCount + nLeafBlowerCount + nVacuumCleaner + nWoodChipper );
; --------------------------- Remove Items --------------- \/
Player.RemoveItem ToasterPostwar nToasterPostwarCount;
Player.RemoveItem ToasterPrewar nToasterPrewarCount;
Player.RemoveItem Camera nCameraCount;
Player.RemoveItem Iron nIronCount;
Player.RemoveItem HotPlate nHotPlateCount;
Player.RemoveItem LeafBlower nLeafBlowerCount;
Player.RemoveItem VacuumCleaner nVacuumCleanerCount;
Player.RemoveItem WoodChipper nWoodChipperCount;
; --------------------------- Add Items ---------------------- \/
Set nMicrofusionCellReturned to ( nApplianceTotal * 3 );
Set nSmallEnergyCellReturned to ( nApplianceTotal * 5 );
Player.AddItem AmmoMicroFusionCell nMicrofusionCellReturned;
Player.AddItem AmmoSmallEnergyCell nSmallEnergyCellReturned;
Player.AddItem ScrapElectronics nToasterCount;
; ------------------------------------------------------------------- BUTTON 2 ---------------------------------------------- \/ ; "Super heat Saturnite Fist"
Elseif ( nButton == 2 )
Set nButton to -1;
Player.RemoveItem NVDLC03WeapSaturniteFist 1;
Player.AddItemHealthPercent NVDLC03WeapSaturniteFistHeat 1 1.00;
Endif
Endif
Else
Return;
Endif

END; menumode 1001

 

If you can help it would be appreciated I don't know where else to post this

Link to comment
Share on other sites

  • Recently Browsing   0 members

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