NWN2 Toolset

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Creating item error

 
Post new topic   Reply to topic    NWN2 Toolset Forum Index -> NWN2 Scripting Help
View previous topic :: View next topic  
Author Message
Masami



Joined: 07 Jan 2008
Posts: 3

PostPosted: Sun Jan 20, 2008 8:28 pm    Post subject: Creating item error Reply with quote

I'm trying to drop an item into the PC's inventory, but I'm getting an "Error: Parsing Variable List" message.

I think my problem is that I'm not putting the right value in for the string for the item template, but I'm not sure what value I'm suppoesd to put in.

Code:

// Examining it will note that you need a shovel to remove it.  However if you have the Old Shovel, it will break attempting it.

object oPC = GetFirstPC();
object oShovel = GetItemPossessedBy(oPC, "SHOVEL01");
string sBroke = "SHOVEL00";


void main()
{//if you do not have the shovel, it will note that you need a shovel.
   ActionSpeakString("Test");

   if (oShovel == OBJECT_INVALID)
   {
      ActionSpeakString("I'll need a shovel to unearth this rock.");
   }
   //if you do have the shovel it will break
   else
   {
      ActionSpeakString("What the- My shovel broke!");
      DestroyObject( oShovel);
      object CreateItemOnObject(sBroke, oPC, 1);
   }
}
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    NWN2 Toolset Forum Index -> NWN2 Scripting Help All times are GMT
Page 1 of 1

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum





Powered by phpBB © 2001 phpBB Group

Chronicles phpBB2 theme by Jakob Persson (http://www.eddingschronicles.com). Stone textures by Patty Herford.

Abuse - Report Abuse
Powered by forumup.com free forum, create your free forum!
Created by Raulken of Hyarbor S.r.l.
TOS & Privacy.

Page generation time: 0.034