• Table just not working.
    11 replies, posted
Hello, Ive been trying to get my table to work, its supposed to give me the next weapon when the player gets a kill, but it just doesn't and I cant see an issue with it, help is highly appreciated: [url]http://pastebin.com/JHkbgYn2[/url] Found an issue yet? I really cant figure it out :)
is this your code
yes
read [url=http://facepunch.com/showthread.php?t=1250283]this[/url] then
I wasnt asking for someone to just give me an answer, I was just looking for a little help in the right direction
honestly, it looks like a bunch of code was just copied and thrown into the file, and makes it look like you have no idea how to code or that you just copied and pasted it. if you really want help you should probably reformat it, give errors if it gives errors (which it probably will) and give the file location (is it in the gamemode file? addon? lua directory?)
You aren't defining level, you should have been getting "Attempt to index nil value" errors. [editline]5th June 2015[/editline] Also, attacker is the 3rd argument, not the first. [editline]5th June 2015[/editline] You are also missing an argument for GiveAmmo
[QUOTE=James xX;47885583]You aren't defining level, you should have been getting "Attempt to index nil value" errors. [editline]5th June 2015[/editline] Also, attacker is the 3rd argument, not the first. [editline]5th June 2015[/editline] You are also missing an argument for GiveAmmo[/QUOTE] Could you elaborate this further?
[QUOTE=mattymoo142;47885659]Could you elaborate this further?[/QUOTE] Which part.
Also, attacker is the 3rd argument, not the first. Edited: You are also missing an argument for GiveAmmo I have now defined level I forgot to add that back in after testing something
[QUOTE=mattymoo142;47885755]Also, attacker is the 3rd argument, not the first. Edited: You are also missing an argument for GiveAmmo I have now defined level I forgot to add that back in after testing something[/QUOTE] In your PlayerDeath hook, you are calling the victim the attacker, where as the attacker is the third argument. Give ammo also requires an amount argument (first one if I remember correctly).
[QUOTE=James xX;47885832]In your PlayerDeath hook, you are calling the victim the attacker, where as the attacker is the third argument. Give ammo also requires an amount argument (first one if I remember correctly).[/QUOTE] thankyou very much
Sorry, you need to Log In to post a reply to this thread.