Jump to content

Home

give mutiple item script problem


rgdelta

Recommended Posts

I have at the end of a dialog a script that runs that gives a bunch of items to the pc script is here.

 

void main() { 
object oItem=CreateItemOnObject( "se_revan_robe", GetFirstPC());
object oItem=CreateItemOnObject( "se_revan_dblsbr1", GetFirstPC()); 
object oItem=CreateItemOnObject( "se_revan_light1", GetFirstPC()); 
object oItem=CreateItemOnObject( "se_revan_short1", GetFirstPC()); 
object oItem=CreateItemOnObject( "se_can_armor", GetFirstPC()); 
object oItem=CreateItemOnObject( "se_bast_robe", GetFirstPC()); 
object oItem=CreateItemOnObject( "se_bast_dblsbr1", GetFirstPC()); 
object oItem=CreateItemOnObject( "se_bast_light1", GetFirstPC()); 
object oItem=CreateItemOnObject( "se_bast_short1", GetFirstPC()); 
} 

 

Problem is Kotor Tool gives me a error when compiling error is

jmaster2.nss(3): Error: Variable "oItem" defined multiple times in the same scope

 

any optimization or help would be appreciated.

Link to comment
Share on other sites

Problem is Kotor Tool gives me a error when compiling error is

jmaster2.nss(3): Error: Variable "oItem" defined multiple times in the same scope

 

any optimization or help would be appreciated.

oItem is a call to a variable... in your case, it wouldn't be necessary..

 

kill the "object oItem=" line from your script and it should work just fine :)

 

void main() { 
CreateItemOnObject( "se_revan_robe", GetFirstPC());
CreateItemOnObject( "se_revan_dblsbr1", GetFirstPC()); 
CreateItemOnObject( "se_revan_light1", GetFirstPC()); 
CreateItemOnObject( "se_revan_short1", GetFirstPC()); 
CreateItemOnObject( "se_can_armor", GetFirstPC()); 
CreateItemOnObject( "se_bast_robe", GetFirstPC()); 
CreateItemOnObject( "se_bast_dblsbr1", GetFirstPC()); 
CreateItemOnObject( "se_bast_light1", GetFirstPC()); 
CreateItemOnObject( "se_bast_short1", GetFirstPC()); 
} 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...