[TIB] a bit-o-help


[Prev][Next][Index][Thread]

[TIB] a bit-o-help



alright.. this code right here is going through a list called CARDS. it checks to see if the fpart(decimal = 0,.25,.5, or .75.. and add's one to each variable d,h,c,s if it is equal to one of those. 
then i takes and stores each var into a list called HIGH. sort's them in decending order. then should check to see if cell number 1 is equal to the vars d,h,c,s. which ever one it equals it puts a corresponding number into list TRUMP. my problem is that it is counting how many of each suit it has. can someone take a look and tell me where it's counting wrong.. im just talking about counting the numbers and storing them to LHIGH

Á= theta

3->dim(LTRUMP)
For(Á,1,3)
0->D
0->H
0->C
0->S
4->dim(LHIGH)
If Á=1
6->A
10->B
If Á=2
11->A
15->B
If Á=3
16->A
20->B
For(Z,A,B)
If fPart(LCARDS(Z))=0
D+1->D
If fPart(LCARDS(Z))=.25
H+1->H
If fPart(LCARDS(Z))=.5
C+1->C
If fPart(LCARDS(Z))=.75
S+1->S
End
D->LHIGH(1)
H->LHIGH(2)
C->LHIGH(3)
S->LHIGH(4)
SortD(LHIGH)
If LHIGH(1)=D
1->LTRUMP(Á)
If LHIGH(1)=H
2->LTRUMP(Á)
If LHIGH(1)=C
3->LTRUMP(Á)
If LHIGH(1)=S
4->LTRUMP(Á)
fPart(LCARDS(21)->T
T>Frac
Ans*4->T
If T=0
T+1->T
If LTRUMP(Á)=T
Stop
End

for some reason that isnt counting them right.. it will count the last one if i use for(Á,1,3) but to see if 1 is working it will mis count them.. any help would be appreciated



Follow-Ups: