Aller au contenu

Photo

Toolset doesnt recognize utility_h


  • Veuillez vous connecter pour répondre
17 réponses à ce sujet

#1
sand beagle

sand beagle
  • Members
  • 22 messages
For some reason my toolset doesnt recognize utility_h or anything that uses #include xxxxx_h. Is there something i dont have set up properly?

#2
Axe_Murderer

Axe_Murderer
  • Members
  • 279 messages
Post your script and the error you are getting.

#3
sand beagle

sand beagle
  • Members
  • 22 messages
Error:

Unable to get the resource information for "utility_h" of type "nss"



It will also give that same error for any kind of "xxxxx_h" but i only need utility_h to work



Script:

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



// Later on in this script, we will use the UT_AddItemToInventory()

// function to add an item to the player's inventory.

// But before we could use it, we have to tell the toolset where

// to look for it. The function is in the "utility_h" script file

// under _Core Includes, we will include this file at the top of

// our script file, above the main function.



#include "utility_h"

#include "plt_my_custom_plot"



void main()

{

// If our plot flag is set to TRUE, that means we have already

// given the items to the player, there is no need to continue

// running this script.

if ( WR_GetPlotFlag( PLT_MY_CUSTOM_PLOT, MY_ITEM_CHECK_FLAG ) == TRUE )

return;



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"1_armor_tunic.uti", 1);

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

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

UT_AddItemToInventory(R"raidens_gloves", 1);

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







// Set our plot flag to TRUE, so the next time this script tries

// to run it will not add extra items to the player's inventory

WR_SetPlotFlag( PLT_MY_CUSTOM_PLOT, MY_ITEM_CHECK_FLAG, TRUE );



// 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 ----


#4
sand beagle

sand beagle
  • Members
  • 22 messages
** i can also create a base script with only #include "utility_h" and it will still give the same error, so i'm not sure what is going on.


#5
Nodrak

Nodrak
  • Members
  • 144 messages
#include "utility_h"
//#include "plt_my_custom_plot"

void main()
{

//if ( WR_GetPlotFlag( PLT_MY_CUSTOM_PLOT, MY_ITEM_CHECK_FLAG ) == TRUE )
//return;

event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);

switch ( nEventType )
{

case EVENT_TYPE_MODULE_LOAD:
{

UT_AddItemToInventory(R"testarmr.uti", 1);
//UT_AddItemToInventory(R"raidens_boots.uti", 1);
//UT_AddItemToInventory(R"raidens_destroyer.uti", 1);
//UT_AddItemToInventory(R"raidens_gloves", 1);
//UT_AddItemToInventory(R"raidens_ring.uti", 1);
//WR_SetPlotFlag( PLT_MY_CUSTOM_PLOT, MY_ITEM_CHECK_FLAG, TRUE );

break;
}

default:

break;
}

}

Compiles fine here, any problems you are having must be related to your plot resource.

Edit:  Found your issue, you need to include "wrappers_h", either in this script or in your "plt_my_custom_plot" file. WR_ signifies a wrapper.

Modifié par Nodrak, 21 novembre 2009 - 08:22 .


#6
sand beagle

sand beagle
  • Members
  • 22 messages
Hmm, that sounds like it is the problem but when i try that i get this:
E: 03:30:59 - my_event_handler_fixed_1.nss - Unable to get the resource information for "wrappers_h" of type "nss"
:(

** this is how i wrote it
#include "wrappers_h"
#include "utility_h"
#include "plt_my_custom_plot"

just above "utility_h", right?

Modifié par sand beagle, 21 novembre 2009 - 08:32 .


#7
Sunjammer

Sunjammer
  • Members
  • 925 messages
Open "wrappers_h" (read only is fine) then try compiling your script again. It will doubtless complain about something else so open that. Keep going until it compiles. If you get bored you can always select every script except yours in the palette (hide folder first) and open them. Then open and compile your script.

#8
sand beagle

sand beagle
  • Members
  • 22 messages
where do i find wrappers_h to open it? i only have 7 scripts above my folder, but they are just like area_core.nss, creature_core.nss, merchant_core.nss etc. is that where i am supposed to be looking?

#9
Qkrch

Qkrch
  • Members
  • 128 messages
That happened to me when I made the script in the "client scripts" palette instead of the "scripts" palette. Changed it and worked.



What's the real difference between these two palettes?

#10
Axe_Murderer

Axe_Murderer
  • Members
  • 279 messages
Client scripts are used for testing or creating machinima in conjunction with the cutscene capture system. They simulate a player's input so you can run the game automated. So basically instead of starting the game and playing it yourself manually, you start it and tell it what client script to run and the client script plays the game for you. It's a very cool feature I think.

Modifié par Axe_Murderer, 21 novembre 2009 - 03:31 .


#11
Sunjammer

Sunjammer
  • Members
  • 925 messages
I was under the impression client scripts were disabled. Has anyone tested them?

#12
sand beagle

sand beagle
  • Members
  • 22 messages
Nope, mine is in the scripts palette, i think i just dont have all the files or something :(

#13
weriKK

weriKK
  • Members
  • 106 messages
Look here: http://social.biowar...x/259849#265235



I assume this thread is related to your other thread?

#14
sand beagle

sand beagle
  • Members
  • 22 messages
yeah, it was, but i created this one when i realized that something is really wrong with the toolset or im just missing files, rather than having an issue with how i was compiling the script :<

#15
Axe_Murderer

Axe_Murderer
  • Members
  • 279 messages
Sounds like something is messed with your installation to me.

#16
sand beagle

sand beagle
  • Members
  • 22 messages
i reinstalled it twice now, but i'm not sure, is there some way i can physically search for these files to see if i have them?

#17
sand beagle

sand beagle
  • Members
  • 22 messages
I think the problem might be because i have windows 7 64 bit, and i had to custom setup the toolset with SQL server management studio express, to avoid the "could not connect to database" problem. Now however, I am not so sure I got all of the files, seeing as it doesnt recognize anything like #include xxxxxx_h. Also i cant open up already created items or creatures or anything like that that is already in the game, i can only create my own items.

Modifié par sand beagle, 22 novembre 2009 - 09:33 .


#18
Notthenoviceyouarelookingfor

Notthenoviceyouarelookingfor
  • Members
  • 1 messages
Hey, I don't know if you still have your project stashed away somewhere, but I had exactly the same problem BUT was fixed by a language setting.

none0421 found the solution to this tedius problem here:
http://social.biowar...-1793558-1.html

Quoting them: "after I change it to English(United States), guess what? It compiled."

Hopefully this works for you too, and thanks for bringing up this problem!