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?
Toolset doesnt recognize utility_h
Débuté par
sand beagle
, nov. 21 2009 07:08
#1
Posté 21 novembre 2009 - 07:08
#2
Posté 21 novembre 2009 - 07:27
Post your script and the error you are getting.
#3
Posté 21 novembre 2009 - 07:35
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 ----
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
Posté 21 novembre 2009 - 07:40
** 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
Posté 21 novembre 2009 - 08:20
#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.
//#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
Posté 21 novembre 2009 - 08:31
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?
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
Posté 21 novembre 2009 - 09:21
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
Posté 21 novembre 2009 - 09:51
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
Posté 21 novembre 2009 - 10:48
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?
What's the real difference between these two palettes?
#10
Posté 21 novembre 2009 - 03:31
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
Posté 21 novembre 2009 - 07:16
I was under the impression client scripts were disabled. Has anyone tested them?
#12
Posté 21 novembre 2009 - 10:20
Nope, mine is in the scripts palette, i think i just dont have all the files or something
#13
Posté 21 novembre 2009 - 10:22
Look here: http://social.biowar...x/259849#265235
I assume this thread is related to your other thread?
I assume this thread is related to your other thread?
#14
Posté 21 novembre 2009 - 10:30
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
Posté 21 novembre 2009 - 10:31
Sounds like something is messed with your installation to me.
#16
Posté 21 novembre 2009 - 10:34
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
Posté 22 novembre 2009 - 09:32
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
Posté 05 novembre 2013 - 06:10
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!
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!





Retour en haut






