Jump to content

Home

Script compiling Error ?


kdsphantom

Recommended Posts

Just starting out Trying to work with making, creating and general modding.

Started last couple days with Fred the great's KT tool set, and all the other great peoples tool set's, I have downloaded and installed to the best of my abilities and knowledge all the tools.

 

Trying to compile my first script, heh something to easy I i couldnt mess it up.

 

void main()

 

CreateObject( OBJECT_TYPE_CREATURE, "n_hk50_01.utc", MyLoc);

 

When I try to compile this i get a Syntax Error at "CreateObject"

as I typo alot in creating the script i copy pasted everything heh to avoid such things, and have over the last hour and so, re looked and re read the forums trying to solve my error.

 

Any help? BTW at this point if the works , AKA fires up and spawns a hk-50 isnt an issue, I loaded KT tool used the map set to clear 502ord map and cleared it of everything, and this lil script was an attempt then to see if I could fire a spawn when clicking on the news_report terminal.

thank you

kdsphantom

 

EDIT: more information-This Script is for TSL, Using nwnnsscomp.exe, and i used a Bat file to fire the nwnnsscomp.exe.

 

NWNNSSCOMP -c -g 2 *.nss --outputdir j:\starwars\files\test

pause

 

Is the Bat file content.

Link to comment
Share on other sites

thank you LSaberDuelist

even after the hours looking at the line i didnt see that i had left in the extension.

thinking i had made a typo i just copy pasted from your post but still the "syntax error". but again thank you for the post :)

 

Do i just have to little of a script ? but isnt that the line to spawn a creature ? and isnt that the correct syntax? and spacing? and wouldnt GetTag have working for a location ?

kdsphantom

Link to comment
Share on other sites

Can you post your entire script?

 

You'll find examples in this tutorial: http://www.lucasforums.com/showthread.php?t=143536

 

You have to specify the location and you need to have use {}

 

void main()
{
 CreateObject( OBJECT_TYPE_CREATURE, "n_hk50_01", Location(Vector(0.00,0.00,0.00), 0.0)); 

}

 

Replace 0.00,0.00,0.00 by the xyz coordinates of where you want to spawn the object.

Link to comment
Share on other sites

that is it Darth333

 

void main()

 

CreateObject( OBJECT_TYPE_CREATURE, "n_hk50_01", MyLoc);

 

is that just to small?

Just starting trying to do things one step at a time, these are my first attempts at working to compile a script, spawn a creature and spawning a creature working with in game clicky.

As you can see i got stopped at step 1 in learning my lessons.

thank you

kdsphantom

Link to comment
Share on other sites

Do i just have to little of a script ? kdsphantom

 

I dont know, maybe you can post your whole script ? This is not the whole script, is it?

 

but isnt that the line to spawn a creature ? kdsphantom

Basically, it is but you have to take more aspects into consideration, like reentry and so on, take a look at http://www.lucasforums.com/showthread.php?t=143536.

and isnt that the correct syntax? and spacing? and wouldnt GetTag have working for a location ?

kdsphantom

Spacing is irrelevant, but for the sake of readability one should stick to the conventions. With GetTag you check the tag of an object like a placeable or a creature. I dont think the location has a tag, because there is no real need for it. Location is just(x-coordinate, y-coordinate, z-coordinate, orientation), I think...

Link to comment
Share on other sites

Thank you Darth333 script angel :)

code is

CreateObject( OBJECT_TYPE_CREATURE, "n_hk50_01", Location(Vector(37.6546,-39.6384,9.5015), 0.0));

 

i Have your whereami armband but i was using KT tool set with the module and map 502ord set the mod i was tinkering around with to learn and use was based with clicking the news repart terminal there, so i ddint have to go there to get the locactions. but putting in that and using the correct systax the script compiled and YEA! i have compiled my first script! so thank you for your patience.

 

Thank you LSaberDuelist

Aye the GetTag i meant was exactly as the object from KT was called from the mod If that makes sense how i phrase that. Prolly doesnt just the way im looking at creating mods, and what i know i need to learn to do that. and the baby steps i know i need and the way i wanna go about those. Like atm i have no care about re entry, i know down the road that will matter.

 

But thank you both of you :) and heh if i matters i ahve read all the script threads a few times heh im sure it doesnt seem like it, It jsut is they didnt take, im just growing old an slow hehe )

kdsphantom

 

The script was/is set to fire from the Olderon market square news terminal. clicking on that should summon the HK-50, that was why i was trying more to use the Myloc tag to begin with and why i was asking abou the GetTag.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...