rgdelta Posted August 13, 2005 Share Posted August 13, 2005 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 More sharing options...
ChAiNz.2da Posted August 13, 2005 Share Posted August 13, 2005 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 More sharing options...
rgdelta Posted August 13, 2005 Author Share Posted August 13, 2005 Thanks I thought that was the issue but was not sure if I could do it without the variable reference. It worked like a charm thanks for the help and quick response. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.