Unexpected end of script

madtoyz

New member
Messages
173
Points
0
29953,black_valk_shoes,Black Valkyrian Shoes,5,0,,500,,13,,1,0xFFFFFFFE,2,2,64,,1,1,0,{ bonus bAllStats,1; bonus bMaxSPrate,20; bonus bMdef,5; bonus bUnbreakableShoes,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus bMaxHP,(BaseLevel*5); else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bMaxSP,(JobLevel*2); },{},{}29954,Black_Valkyrja_Helm,Black Valkyrie Helm,5,100000,,1000,,5,,1,0xFFFFFFFE,2,2,256,,0,1,2049,{ bonus bAllStats,2; bonus bMdef,5; bonus bAtkRate,5; if(getrefine() > 5 && getrefine() <= 12) { bonus2 bAddRace,RC_DemiHuman,(getrefine() - 5); bonus2 bSubRace,RC_DemiHuman,(getrefine() - 5); } if(getrefine() > 12) { bonus2 bAddRace,RC_DemiHuman,7; bonus2 bSubRace,RC_DemiHuman,7; },{},{}29955,black_valk_shield,Black Valkyrja's Shield,5,0,,0,,5,,1,0xFFFFFFFE,2,2,32,,95,0,4,{ bonus bAllStats,2; bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Fire,20; bonus bMdef,5; bonus bMaxHP,(BaseLevel*5) if(getrefine()>=5){ bonus2 bSubEle,Ele_Neutral,getrefine()-4; } if(getrefine()>=7){ bonus2 bSubEle,Ele_Neutral,5; } if(getrefine()>=9){ bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Fire,10; } if(getrefine()>=13){ bonus2 bSubEle,Ele_Neutral,12-getrefine(); },{},{}
This my item_db2 line 133 until 135

whatproblemhere_zps775a9169.jpg


 
As you can see when expanding the script, you see a closing curly is missing: the curly that closes the first one. If you have mismatching curlys your script won't work and you'll see an error like that one. See the error in the picture when I expanded your item script?

8xcy.png


This can be fixed by just adding the missing closing curly, just like this:

29954,Black_Valkyrja_Helm,Black Valkyrie Helm,5,100000,,1000,,5,,1,0xFFFFFFFE,2,2,256,,0,1,2049,{ bonus bAllStats,2; bonus bMdef,5; bonus bAtkRate,5; if(getrefine() > 5 && getrefine() <= 12) { bonus2 bAddRace,RC_DemiHuman,(getrefine() - 5); bonus2 bSubRace,RC_DemiHuman,(getrefine() - 5); } if(getrefine() > 12) { bonus2 bAddRace,RC_DemiHuman,7; bonus2 bSubRace,RC_DemiHuman,7; } },{},{}

P.S.: I expanded the script just so you can see, I imagine you already know you can't do it on your actual item db files.

 
Last edited by a moderator:
ok i get it, forget to put " } " ...thanks

now the error on line 135.

29955,black_valk_shield,Black Valkyrja's Shield,5,0,,0,,5,,1,0xFFFFFFFE,2,2,32,,95,0,4,{ bonus bAllStats,2; bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Fire,20; bonus bMdef,5; bonus bMaxHP,(BaseLevel*5) if(getrefine()>=5){ bonus2 bSubEle,Ele_Neutral,getrefine()-4; } if(getrefine()>=7){ bonus2 bSubEle,Ele_Neutral,5; } if(getrefine()>=9){ bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Fire,10; } if(getrefine()>=13){ bonus2 bSubEle,Ele_Neutral,12-getrefine(); },{},{}
 
Last edited by a moderator:
problem solve

Code:
29955,black_valk_shield,Black Valkyrja's Shield,5,0,,0,,5,,1,0xFFFFFFFE,2,2,32,,95,0,4,{ bonus bAllStats,2; bonus bMaxHP,(BaseLevel*5); bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Fire,20; bonus bMdef,5; if(getrefine()>=5){ bonus2 bSubEle,Ele_Neutral,getrefine()-4; } if(getrefine()>=7){ bonus2 bSubEle,Ele_Neutral,5; } if(getrefine()>=9){ bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Fire,10; } if(getrefine()>=13){ bonus2 bSubEle,Ele_Neutral,12-getrefine(); } },{},{}
 
Yeah, the problem was the same, the ending closing curly. Try to check your curlies next time.

A good habit is when you'll open any kind of brackets (regular, square or curly), immediately close them and then work on what they should contain. This way you won't ever have any of these errors.

 
Back
Top