Small problem with the following script, it will not compile. How and where should I define the variable (GetIsObjectValid(oItem)).
Thanks:)
1 /*
2 script_01
3 Usage:- OnAction_Conversation Editor
4 */
5
6 #include "nw_i0_tool"
7
8 void main()
9
10 {
11 get player
12 object oPC = GetPCSpeaker();
13
14 //reward
15 RewardPartyXP(2500, oPC, FALSE);
16 RewardPartyGP(10000, oPC, FALSE);
17
18 //remove quest item from PC
19 object oTarget;
20 oTarget = GetItemPossessedBy(oPC, "Quest_Item");
21
22 if (GetIsObjectValid(oItem))
23
24 // destroy "Quest_Item"
25 DestroyObject(oItem);
26 }
/*
Error. 'script_01' did not compile.
script_01.nss(22): ERROR: VARIABLE DEFINED WITHOUT TYPE
*/
Error:- Variable Defined Without Type
Débuté par
Willowy
, sept. 12 2011 12:03
#1
Posté 12 septembre 2011 - 12:03
#2
Posté 12 septembre 2011 - 12:18
line 19 and 20
change from
object oTarget;
oTarget = GetItemPossessedBy(oPC, "Quest_Item");
to
object oItem = GetItemPossessedBy(oPC, "Quest_Item");
change from
object oTarget;
oTarget = GetItemPossessedBy(oPC, "Quest_Item");
to
object oItem = GetItemPossessedBy(oPC, "Quest_Item");
Modifié par Lightfoot8, 12 septembre 2011 - 12:19 .
#3
Posté 12 septembre 2011 - 01:42
Thanks you, that did the job.
Talk about not seeing the woods for the trees!:pinched:Too many late nights me thinks.
Talk about not seeing the woods for the trees!:pinched:Too many late nights me thinks.





Retour en haut






