PDA

View Full Version : Help with a script


Godric Volturi
08-17-2009, 06:52 PM
Okay, so I am trying to make a compiled script for a recruitable character... (remember the jedi on the Endar Spire... yeah, her. :P only I changed her to a Twi'lek)

So anyway, here's the script I used from Darth333's tutorial:

void main()
{
RemoveAvailableNPC(7);
AddAvailableNPCbyTemplate(7, "p_cleopatra)");
DelayCommand(1.5,ShowPartySelectionGUI());
}

and here's what pops up on my screen...

Lookup path root set to: C:\Program Files\LucasArts\Star Wars Knights of the Old Republic\
Loaded nwscript.nss from C:\Program Files\LucasArts\Star Wars Knights of the Old Republic\override/
Compiling: cleo_recruit.nss
cleo_recruit.nss(4): Error: Undeclared identifier
"AddAvailableNPCbyTemplate"
Compilation aborted with errors
Total Execution time= 31 ms

any help would be super appreciated... plus if you can help, I'll try to return the favor one day. :thmbup1:

Exile007
08-17-2009, 08:48 PM
Try this:

void main()
{
RemoveAvailableNPC(7);
AddAvailableNPCbyTemplate(7, "p_cleopatra");
DelayCommand(1.5,ShowPartySelectionGUI());
}

You had an extra parentheses in "pl_cleopatra". ;)

Godric Volturi
08-17-2009, 08:56 PM
*slaps his own face* Dayum... I'm an idiot sometimes. :

:edit:

I'm still getting the same response. -.-

Canderis
08-17-2009, 09:04 PM
Try opening up the source script in a recruitment mod. Just change that to fit you.

Godric Volturi
08-17-2009, 10:12 PM
I tried that but it didn't work. >.> The thing is... I can compile the script that I used when it's the same, but when I alter it to fit my Template ResRef, it always says that there is an error. O_o

Canderis
08-17-2009, 10:43 PM
Try shortening it.

Godric Volturi
08-17-2009, 10:46 PM
I did and still nothing. O-O I think the scripts just hate me. :'(

Canderis
08-17-2009, 10:49 PM
Odd.

Godric Volturi
08-17-2009, 11:16 PM
Could it have anything to do with the fact that I used the Kotor Tool GFF editor?

Star Admiral
08-17-2009, 11:49 PM
Actually, no. You need to capitalize the "B" in AddAvailableNPCByTemplate(), like this:

void main() {
RemoveAvailableNPC(7);
AddAvailableNPCByTemplate(7, "p_cleopatra");
DelayCommand(1.5,ShowPartySelectionGUI());
}

- Star Admiral

Godric Volturi
08-17-2009, 11:54 PM
Yeah, I have it capitalized and I still can't.

Exile007
08-18-2009, 01:52 PM
That is extremely odd. I just compiled it with KotOR Tool and it came out fine. :confused:

If you'd PM me your e-mail, I'd be more than happy to send you the compiled script + source. :)

Godric Volturi
08-18-2009, 02:35 PM
Like I said, I think that scripts just hate me... everytime I try to write one... no matter if I'm on my laptop, my home computer, my friend's computer or on any computer, scripts just don't want to compile for me.


:firemad: Stupid scripts. :firemad: