Rydo Posted December 21, 2012 Author Share Posted December 21, 2012 So, I use EM and the only problem so far with it is something to do with combat xp.```' Give player combat exp If Item(GetPlayerEquipment(attacker, weapon)).CombatTypeReq > 0 Then GivePlayerCombatEXP attacker, GetPlayerEquipment(attacker, weapon), exp / 4 End If```I get subscription out of range and it highlightsIf Item(GetPlayerEquipment(attacker, weapon)).CombatTypeReq > 0 Thenof the above code Link to comment Share on other sites More sharing options...
Growlith1223 Posted December 21, 2012 Share Posted December 21, 2012 Press debug, and have your mouse over each variable to see whih one says subscript out of range. Link to comment Share on other sites More sharing options...
Rydo Posted December 21, 2012 Author Share Posted December 21, 2012 the whole sentenceIf Item(GetPlayerEquipment(attacker, weapon)).CombatTypeReq > 0 Then Link to comment Share on other sites More sharing options...
Ertzel Posted December 21, 2012 Share Posted December 21, 2012 Are you trying to use old item files from before this combat system was made? If so, they won't have a combat type and will cause this error. Link to comment Share on other sites More sharing options...
Rydo Posted December 21, 2012 Author Share Posted December 21, 2012 I deleted all the item files, its when I try to kill an npc, it crashes the server saying runtime error 9, subscription out of range Link to comment Share on other sites More sharing options...
DshWinchester Posted December 22, 2012 Share Posted December 22, 2012 make sure you have a weaponif GetPlayerEquipment(attacker, weapon) >0 then[background=rgb(248, 248, 248)]If Item(GetPlayerEquipment(attacker, weapon)).CombatTypeReq > 0 Then[/background]GivePlayerCombatEXP attacker, GetPlayerEquipment(attacker, weapon), exp / 4End Ifend if Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now