[Scripting] Script won't find my REFs

Post » Fri May 27, 2011 6:53 am

Hi Community!
I started using the GECK about 1 week ago, so my problem may be just a thinking error on my side.
I made myself a little script to stock shelves in my home with predetermined stuff.
I will describe the situation as detailed as possible so please bear with me for a moment.

First I created an Activator(Box of 9mm Ammo) with a small script.
Activating it will give you 1 clip of 9mm Ammo (20 Bullets) and then disables the thing.
I created about 8 or 10 REFs of that activator and gave em all seperate IDs: 01PSAmmo9mmREF01 to 01PSAmmo9mmREF08.
They all start disabled and are persistend references.



Thats for the first part. Now I wanted to create another Activator to stock the shelves. And here starts my problem:
scn 01PSAmmo9mmShelfRestockScriptBegin OnActivate   if 01PSAmmo9mmREF01.GetDisabled == 1 && Player.GetItemcount Ammo9mm >= 20     01PSAmmo9mmREF01.Enable     Player.RemoveItem Ammo9mm 20   endifEnd;the if part repeats for every REF from 01 to 08


Now Everytime I tried to save the script I get an error:

SCRIPTS: Script '01PSAmmo9mmShelfRefillScript' line 7:
Script command "01PSAmmo9mmREF01" not found.


Even if I remove the whole if part and just write a simple testscript with only the .Enable part I get the same error.
why does he think my REF is an command?

I would really appreciate some help on that problem.

Thanks a lot!
Kiran

PS: Please excuse my bad english, it's not my native language.
User avatar
BrEezy Baby
 
Posts: 3478
Joined: Sun Mar 11, 2007 4:22 am

Post » Fri May 27, 2011 5:49 pm

Editor ID's mustn't start with digits.
User avatar
carley moss
 
Posts: 3331
Joined: Tue Jun 20, 2006 5:05 pm

Post » Fri May 27, 2011 7:59 pm

I think that bug's only on references?
User avatar
lilmissparty
 
Posts: 3469
Joined: Sun Jul 23, 2006 7:51 pm

Post » Fri May 27, 2011 3:25 pm

I can't believe it was such a stupid thing! :facepalm: Thanks a lot JustinOther!!
I would have never guessed that this is the problem because I already have some triggers, doors, scripts with the 01PS Prefix working just fine.
Well I think I'll remind that mistake a long time.

Greetings Kiran
User avatar
Karine laverre
 
Posts: 3439
Joined: Tue Mar 20, 2007 7:50 am

Post » Fri May 27, 2011 9:36 am

I think that bug's only on references?
Ive seen it happen in a few other, non-reference, cases too in FO3 and TES4. Albeit, I've seen instances in both other games where it works out ok, but I've always just avoided it to be on the safe side.
I can't believe it was such a stupid thing! :facepalm: Thanks a lot JustinOther!!
I would have never guessed that this is the problem because I already have some triggers, doors, scripts with the 01PS Prefix working just fine.
Well I think I'll remind that mistake a long time.

Greetings Kiran
NP :) A good way to easily find your stuff amongst the vanilla stuff without '00' to push it up top is to use a prefix for everything, then you can start typing your prefix in whatever list you're in and the GECK will automatically highlight the first match.
User avatar
John Moore
 
Posts: 3294
Joined: Sun Jun 10, 2007 8:18 am


Return to Fallout: New Vegas