Script won't compile, validator says its okay

Post » Sat Jul 24, 2010 6:00 am

scn VXPowderGangerSpawnScript

int bInit
int bSpawn
ref rEnemy01
ref rEnemy02

Begin OnLoad
if (bInit == 0)
set bSpawn to 1
set bInit to 1
endif
End

Begin GameMode
if (bSpawn == 1)
set rEnemy01 to VXPowderGangerSpawnREF.PlaceAtMe NCRCFPowderGangerGunAAM3 1
set rEnemy02 to VXPowderGangerSpawnREF.PlaceAtMe NCRCFPowderGangerGunAAM3 1
set bSpawn to 0
elseif (rEnemy01.GetDead && rEnemy02.GetDead)
set bSpawn to 1
endif
End

======================================

Anyone see what's wrong here? I'm trying to get this to work on an xmarkerheading, named (ref editor ID) VXPowderGangerSpawnREF, this is going to eventually have a timer etc, however, I can't even get this to compile so why bother with the rest of the code.

The script validator says its alright... NV Powerup doesn't work for me.

I've asked like three people on the NVNexus forums about this, noone knows whats wrong here. If you figure it out, I'll give you credit in my mod.

thanks

Soaren
User avatar
Anthony Rand
 
Posts: 3439
Joined: Wed May 09, 2007 5:02 am

Post » Sat Jul 24, 2010 1:42 am

These lines look wrong

set rEnemy01 to VXPowderGangerSpawnREF.PlaceAtMe NCRCFPowderGangerGunAAM3 1set rEnemy02 to VXPowderGangerSpawnREF.PlaceAtMe NCRCFPowderGangerGunAAM3 1



Perhaps this will work

set rEnemy01 to VXPowderGangerSpawnREFPlaceAtMe rEnemy01set rEnemy02 to VXPowderGangerSpawnREFPlaceAtMe rEnemy02


Careful with the use of PlaceAtMe, it causes save file bloat unless you use MarkForDelete.
User avatar
maria Dwyer
 
Posts: 3422
Joined: Sat Jan 27, 2007 11:24 am

Post » Fri Jul 23, 2010 5:43 pm

No, those lines are correct - http://geck.gamesas.com/index.php/PlaceAtMe returns the refID of the created reference.

I haven't noticed any syntax errors, so I think the problem is probably that one of the referenced forms either doesn't exist or is somehow invalid. Make sure that VXPowderGangerSpawnREF is a persistent reference, and that NCRCFPowderGangerGunAAM3 is a form that can have references.

Cipscis
User avatar
des lynam
 
Posts: 3444
Joined: Thu Jul 19, 2007 4:07 pm


Return to Fallout: New Vegas