View Full Version : my merchant script wont work
Canderis
08-04-2008, 02:30 PM
my script wont work please tell me why
// ST: st_startstore.nss
void main() {
object oStore = GetObjectByTag("mandomerch001");
object oSpeaker = GetPCSpeaker();
if (!GetIsObjectValid(oStore))
oStore = CreateObject(OBJECT_TYPE_STORE, "mandomerch001", GetLocation(OBJECT_SELF));
if (GetIsObjectValid(oStore))
DelayCommand(0.5, OpenStore(oStore, oSpeaker));
}
i followd the merchant tut
EnderWiggin
08-04-2008, 02:33 PM
{snip}
void main() {
object oStore = GetObjectByTag("SHOP_TAG_HERE");
object oSpeaker = GetPCSpeaker();
if (!GetIsObjectValid(oStore))
oStore = CreateObject(OBJECT_TYPE_STORE, "SHOP_TAG_HERE", GetLocation(OBJECT_SELF));
if (GetIsObjectValid(oStore))
DelayCommand(0.5, OpenStore(oStore, oSpeaker));
}
That's the right script, it seems. I think that your tag must be wrong. If you're unsure what your tag is, post a screenshot of the file.
_EW_
Canderis
08-04-2008, 02:46 PM
i know what the tag is but tag of...?
EnderWiggin
08-04-2008, 02:49 PM
i know what the tag is but tag of...?
The *.utm file of your store.
_EW_
Canderis
08-04-2008, 02:51 PM
thats what i had but the script wouldent fire
EnderWiggin
08-04-2008, 02:57 PM
Are you sure? Can you post a screenshot of the tag?
The script isn't the problem. Are you compiling the script? Are you putting the script in your override? Are you attaching the script to a dialog?
_EW_
Istorian
08-04-2008, 03:01 PM
Canderis, you probably haven't attached the script to a dialogue node.
Oh, and I have to say one thing to you: Now that EW is dealing with your problem, it will be solved, no matter what...Way to go, EW;)
|I|
Canderis
08-04-2008, 03:27 PM
its attached to the dialog the tag is right
dlg file
http://i313.photobucket.com/albums/ll378/canderis/helphelphelp.jpg
Istorian
08-04-2008, 04:13 PM
Well, your script is named "st_startstore", and in the dialogue you have "st_startstore001". That's why the store doesn't open;)
|I|
Canderis
08-04-2008, 04:16 PM
i never posted the name did i?
Istorian
08-04-2008, 04:17 PM
I saw the name from your script in the first post!:xp:
|I|
Canderis
08-04-2008, 04:19 PM
well ill try renaming it do i put it in the override or in the .mod file?
EnderWiggin
08-04-2008, 04:20 PM
No, you didn't. But that's what the stoffe named her script, which is the script you are using.
And try putting it in a blank node (like make a new struct spoken by the NPC, leave it blank, and then put the script there.)
I'm not sure if that will work, but I know it's something that I always abide by.
_EW_
Canderis
08-04-2008, 04:23 PM
well do i put the script in override or in the .mod file??
Istorian
08-04-2008, 04:31 PM
.mod file....
|I|
EnderWiggin
08-04-2008, 05:27 PM
That depends. If you have a mod file, then yes, it goes in your mod file. Pack everything in there and try again.
_EW_
vBulletin®, Copyright ©2000-2013, Jelsoft Enterprises Ltd.