ID:144597
 
Code:
mob/proc/DisplayCardInHand()
for(var/obj/card/O in src.client.screen)
src.client.screen-=O
var/i=1
var/maxhand=src.hand.len
for(i,i<=maxhand,i++)
var/ypos=0
var/obj/card/O = src.hand[i]
var/q=i%8
if(q==0) q=9
O.layer=55+q
if(i<9) ypos=0
else if(i>=9&&i<17) ypos=1
else if(i>=17&&i<25) ypos=2
else if(i>=25&&i<33) ypos=3
else if(i>=33&&i<40) ypos=4
else ypos=5
var/xpos
var/p = i-1
xpos=p%8
var/xmpos=0
var/xppos=14*xpos
while(xppos>32)
xmpos++
xppos-=32
O.screen_loc="[10+xmpos]:[xppos],[2+ypos]"
src.client.screen+=O


Problem description:if u have 2 of the same card in hand it wont show them twice on screen can u help me please i want it to show as many times as it is in hand on screen.

for(i,i<=maxhand,i++) *buzz* this isnt c++ stop trying to use such c++y methods in it, just put for(var/obj/card/O in usr.hand) also, im not sure why that isnt working, my only guess is that when byond creates lists of things if it has 2 of them with the same name they pretty much just overlap

var/p = i-1
xpos=p%8
wtf? returns the remainder no? how could u possibly be using this lol
In response to Falacy
I fixed it :)
In response to KillerGrand
Quit it with the bold letters all the time o_o