Jump to content

Photo

player.additem in quest script will not save


  • Please log in to reply
1 reply to this topic

#1
natethegreatt

natethegreatt

    Stranger

  • Members
  • Pip
  • 8 posts
I'm very new to GECK so I thought I'd start out with some simple scripts. I'm having a bit of a problem with this one:

scn QuestAddItem1

short once

begin gamemode
	if once == 1
		return
	else
		player.additem 00004240 50
		set once to 1
	endif
end

When I remove the player.additem line, the script saves fine. While it's there, however, the script will not save.

Any suggestions?

#2
Khet

Khet

    Khet Thelonius Maxwell III

  • Members
  • PipPipPipPip
  • 1,193 posts
two things. One, I would set it up like this:

scn Name

short DoOnce

Begin GameMode

If DoOnce == 0
  Player.Additem EDITORID ##
  Set DoOnce to 1
EndIf

End

There's no need for the checking once and return. Better off just stopping it right away once the condition is met.

That said, you're using the ITEM ID rather than the EDITOR ID. Reference the Editor ID (ArmorFiendHelmet01) instead of 000E89F3 (That is the item ID of the same helmet) then it'll work. Scripts use editor ID and console uses item ID.


Edit: Also, it's a bug in the NV GECK (or I hope it is) that if the syntax of a script is wrong, it will not save, but unlike the Fallout 3 GECK, it won't display the error. It's a pain in the ass, but if you have both NV and FO3, you could launch of the FO3 GECK, copy/paste the script in and try to save. If the Syntax is wrong it'll report what's wrong, and I bet if you did that with your original, FO3 would complain about you using item ID rather than the editor ID.




Page loaded in: 1.019 seconds