Jump to content

Error with .nss file when compiling script


hoofhearted4

Recommended Posts

so im following this little tutorial on how to edit and add weapons to my inventory.

 

i created two weapons while following the tutorial and everything worked perfectly. they show up in my game exactly how i made them. however when i went back to add some more stuff, when i compile now i get this error:

 

"my_events_handler.nss - my_events_handler.nss(32): Unknown error"

 

followed by:

 

"Could not get script resource information"

 

this is my script:

 

 

 

// ---- SCRIPT STARTS HERE ----

 

#include "utility_h"

 

void main()

{

event ev = GetCurrentEvent();

int nEventType = GetEventType(ev);

 

// We will watch for every event type and if the one we need

// appears we will handle it as a special case. We will ignore the rest

// of the events

switch ( nEventType )

{

// This event happenes every time the module loads

// This usually happenes when creating a new game

// or loading a savegame

case EVENT_TYPE_MODULE_LOAD:

{

// The UT_AddItemToInventory function adds various resources to a

// creature's inventory. Here we add one weapon and one shield.

UT_AddItemToInventory(R"makers_belt.uti", 2);

UT_AddItemToInventory(R"makers_shield.uti", 1);

UT_AddItemToInventory(R"makers_helm.uti", 1);

UT_AddItemToInventory(R"makers_helm_2.uti", 1);

UT_AddItemToInventory(R"makers_boots.uti", 1);

UT_AddItemToInventory(R"makers_boots_2.uti", 1);

UT_AddItemToInventory(R"makers_gauntlets.uti", 1);

UT_AddItemToInventory(R"makers_gauntlets_2.uti", 1);

UT_AddItemToInventory(R"makers_chest_plate", 1);

UT_AddItemToInventory(R"makers_chest_plate_2.uti", 1);

UT_AddItemToInventory(R"makers_sword_1h.uti", 1);

UT_AddItemToInventory(R"makers_ring.uti", 4);

 

// We have dealt with the event we were waiting for.

// At this point we can stop looking for other events

break;

}

default:

break;

}

}

// ---- SCRIPT ENDS HERE ----

 

 

 

im assuming its not something in the actual script since i just copied and pasted everything. the only thing i can think of is that it has something to do with over writing problems, that once i exported it the first time, i have to do something different when exporting it the second time?

 

this is the very first thing ive ever done with the DAO toolset, so im slowly learning as i go. i appreciate the help and information :)

Edited by hoofhearted4
Link to comment
Share on other sites

i was afraid of that. so basically get it all done the first time

 

or is there a way to recompile the script correctly? cause having to redo the entire mod just to change something seems a little drastic?

 

for example, i did redo the mod so now all the items i wanted are in the game. however some of the stats of the items are higher then i would like. how would i go back in and edit those stats and/or instead wanted it to give me 2 of an item in my inventory instead of one, and recompile and whatnot correctly?

 

also if i wanted to add another new item to that mod, is there a way? or is it easier to create a new module adding that other item?

 

i appreciate your help. i enjoy learning this even if its just basic stuff :D

Edited by hoofhearted4
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...