ID:264370
 
Code:
            var/obj/A = usr.DECK[1]
usr.HAND += A
usr.DECK.Cut(1,2)
usr.cardsindeck -= 1
usr.cardsinhand += 1

Problem description:
once this has been completed, it will never work again.. i assumed this is becuase DECK[1] no longer exists?? so is there a way to move all other elements of the list to move up one slot in the list? i.e. DECK[2] == DECK[1] etc.

error message in game : List index out of bounds
In response to Ghtry
OMG thank you... although your code resolved the out of bounds problem.. it also didnt draw a card.. it was only on proper inspection of your code that i realised what i was doing wrong (although the .len was very helpful)

it turns out (and i cant believe i didnt spot this sooner) that since i was using usr.contents to hold the cards (tht was the bit my m8 did lol..) he never placed the cards in deck.. so the list deck was empty.. thts why it wasnt drawing anything.. but thank you again.. this has been bugging me for days now