Script problem with an FO3 script

Post » Sat May 28, 2011 12:31 am

Hello,

Whilst FO:NV contains a number of scripts that were actually for use in FO3 I found one that wasn't and it's one I'm trying to use. Basically, I'm looking to replicate the Nuka Cola vending machine that features in the player housing. This is the script...

scn HD01NukaVendingMachineScript;This script is designed to handle the Nuka-Cola Machine that the Player buys for his house;The Player can add Nuka-Colas to the machine and have them changed to Ice-Cold Nuka-Colas;He can then dispense them as he wants to take some or drink themshort Buttonshort NukasOnMeshort GoNukabegin OnActivate	if ( IsActionRef Player == 1 )		if ( Player.GetItemCount NukaCola >= 1 )			ShowMessage HD00NukaMachineWith			set GoNuka to 2		elseif ( Player.GetItemCount NukaCola < 1 )			ShowMessage HD00NukaMachineWithout			set GoNuka to 1		endif		endifendbegin gamemode	set Button to GetButtonPressed	if ( Button == 0 ) && ( GoNuka >= 1 )		Activate		set GoNuka to 0	elseif ( Button == 1 ) && ( GoNuka == 2 )		set NukasOnMe to ( Player.GetItemCount NukaCola )		Player.RemoveItem NukaCola NukasOnMe		HD01NukaMachineRef.AddItem MS05IceNukaCola NukasOnMe		set NukasOnMe to 0		set GoNuka to 0	elseif ( Button == 1 ) && ( GoNuka == 1 )		;Do Nothing		set GoNuka to 0	elseif ( Button == 2 ) && ( GoNuka == 2 )		;Do Nothing		set GoNuka to 0	endifend


FO:NV doesn't like it and won't let me save it. The machine itself is set properly by me and the messages are already set up without me doing anything but for some reason the script will not save.

Any ideas?
User avatar
Amie Mccubbing
 
Posts: 3497
Joined: Thu Aug 31, 2006 11:33 pm

Post » Fri May 27, 2011 9:59 pm

Ah, seem to have got it working now - looks like I had to start the script with just the first line, tell it to use that script and then add the rest of the script in :)
User avatar
Juanita Hernandez
 
Posts: 3269
Joined: Sat Jan 06, 2007 10:36 am


Return to Fallout: New Vegas