View_Cards()
if(!deck.cards.len)
usr << "[usr.name] appears to be out of cards in [usr.game_gender] Deck."
return
var/A = input("Type in a number of cards to view off the top of your Deck.","View Cards on top of Deck.")as null|num
if(!A) return
if(A > deck.cards.len)
usr << "You don't have THAT many cards in your Deck."
return
var/L[A]
var/i
for(i=1, i<=L.len, i++)
L[i] = i
world << "[usr.name] views the top [A] cards of [usr.game_gender] Deck."
input(usr,"Here are the top [A] cards of your Deck.","Viewing cards on top of Deck")as null|anything in L
Problem description:
Okay so what I want it to do is show me a number of cards off the top of the Deck equal to the number that "A" is. How would I iterate that?
In your for loop, change it to this:
for(i = 1, i<=A, i++)
Then change the next line to:
L[i] = deck.cards[i]
I will happily explain what these changes are and why they needed to be done. If you don't understand please ask. Its better that you learn why it happened than just accept that it did and move on.