My question relates to:
int GetBaseItemFitsInInventory ( int nBaseItemType, object oObject );
I’ve copied the example code from the Lexicon for this function (see below) into my Neverwinter Nights EE Toolset compiler, and I’m get the following error: ERROR: NO RIGHT BRACKET ON EXPRESSION.
The error is generated by the “if” conditional statement where the GetBaseItemFitsInInventory function is used. This function is part of the Enhanced Edition new content / update stuff. If anyone knows why the function generates this error, please let me know. Thanks
==============================================================
The Lexicon example code is:
// OnUsed script that would give a plot Greatsword, which is a rather large weapon.
// Since the object will be set as cursed let’s not drop it on the ground!
void main()
{
object oUser = GetLastUsedBy();
if(GetBaseItemFitsInInventory(BASE_ITEM_GREATSWORD, oUser))
{
object oSword = CreateItemOnObject("plot_gsword", oUser, 1);
SetItemCursedFlag(oSword, TRUE);
SendMessageToPC(oUser, "This sword you pulled from the rubble clings to you. You cannot seem to remove it from your inventory!");
}
else
{
SendMessageToPC(oUser, "You find a greatsword but cannot fit it in your inventory. You need to make room to pick it up.");
}
}