swapping clothing script

Post » Mon Jan 11, 2010 2:24 am

I have the morrowind scripting library and i found this script in it, and tried to apply it to my mod. However, it popped up with various errors such as "various mismatched if/end/elseifs starting on line 14" and i have no idea what that means. If anyone knows what that means, and can fix/explain how to fix it to me, i would be extremely greatful!
Heres the script:
begin mc_clothingswapscriptshort currentdayshort localdayshort shirtchangeshort pajammasif ( currentday != Day ) set currentday to day set localday to ( localday + 1 ) set shirtchange to 0endifif ( pajammas == 0 ) if ( gamehour >= 20 )   equip, "nightgown"   set pajammas to 1endifif ( shirtchange == 0 ) if ( localday == 1 )   if ( gamehour >= 6 )     equip, "extravagant_robe_01_c"     set shirtchange to 1     set pajammas to 0   endif endif if ( localday == 2 )   if ( gamehour >= 6 )     equip, "extravagant_robe_01_h"     set shirtchange to 1     set pajammas to 0   endif endif if ( localday == 3 )   if ( gamehour >= 6 )     equip, "extravagant_robe_01_r"     set shirtchange to 1     set pajammas to 0   endif endif if ( localday == 4 )   if ( gamehour >= 6 )     equip, "extravagant_robe_01_t"     set shirtchange to 1     set pajammas to 0   endif endif if ( localday == 5 )   if ( gamehour >= 6 )     equip, "extravagant_robe_01"     set shirtchange to 1     set pajammas to 0   endif endif if ( localday == 6 )   if ( gamehour >= 6 )     equip, "extravagant_robe_01_a"     set shirtchange to 1     set pajammas to 0   endif endif if ( localday == 7 )   if ( gamehour >= 6 )     equip, "extravagant_robe_01_b"     set shirtchange to 1     set pajammas to 0     set localday to 0   endif endifendifend mc_clothingswapscript

User avatar
Dan Endacott
 
Posts: 3419
Joined: Fri Jul 06, 2007 9:12 am

Post » Sun Jan 10, 2010 5:03 pm

For every "if" you put in, there needs to be an "endif." You can't have 3 "if" statements but two "endif" statements.
User avatar
Javier Borjas
 
Posts: 3392
Joined: Tue Nov 13, 2007 6:34 pm

Post » Sun Jan 10, 2010 3:59 pm

For every "if" you put in, there needs to be an "endif." You can't have 3 "if" statements but two "endif" statements.

i added the extra endif and it works perfect now! Thanks!
User avatar
Alberto Aguilera
 
Posts: 3472
Joined: Wed Aug 29, 2007 12:42 am


Return to III - Morrowind