elementaldisaster Posted November 3, 2011 Author Share Posted November 3, 2011 Hey I'm trying to add a currency which can be used at arenas and other PvP areas which is distributed through killing players.In server ModCombat under PlayerAttackPlayer sub i added ```Call GiveInvItem(Index, 50, attacker)```right under```Call PlayerMsg(attacker, "You received no exp.", BrightBlue)```Upon compiling i get "Compile Error: Variable not defined" and "Index" is highlighted.Before someone comes and start calling me a brainless fuck, i just want to say that this is my first attempt at writing a code without a tutorial, and i got what i have already through sifting through the source and trying to find something similar.Also, I'm posting this to learn, if you simply correct me and do not educate me as to why it wasn't right then I'm not learning anything, am I?All help is appreciated, as long as its actually help. Link to comment Share on other sites More sharing options...
erkro1 Posted November 3, 2011 Share Posted November 3, 2011 Your using GiveInvItem wrong, try this:```Call GiveInvItem(attacker, 50, [item val])```replace [item val] with the amount of item 50 you want to give to the player for killing someone. Link to comment Share on other sites More sharing options...
elementaldisaster Posted November 3, 2011 Author Share Posted November 3, 2011 Thanks so much :) I'll try it out when i get home again. 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