I was tring to make a program about the card game War

plz tell me whatz wrong

DECLARE SUB shuffle (deck$())

DECLARE SUB DBD (deck$(), p!)

DIM c(2)

DIM cards$(52)

DIM deck$(4, 52)

DIM discard(2)

DIM prize$(52)

DIM suit$(4)

DIM v(2)

CLS

CALL shuffle(deck$())

DO

round = round + 1

LOCATE 1, 1: PRINT "round:"; round

GOSUB playcards

IF v(1) > v(2) THEN FOR i = 1 TO prize: discard = discard + 1: deck$(3, discard) = prize$(i): NEXT i: prize = 0

IF v(1) < v(2) THEN FOR i = 1 TO prize: discard = discard + 1: deck$(4, discard) = prize$(i): NEXT i: prize = 0

IF v(1) = v(2) THEN GOSUB playcards

LOOP

playcards:

IF deck$(1, 1) = "" OR deck$(2, 1) = "" THEN GOSUB nocards

c$(1) = deck$(1, 1)

c$(2) = deck$(2, 1)

prize = prize + 2

prize$(prize - 1) = c$(1)

prize$(prize) = c$(2)

FOR i = 1 TO 2

IF LEFT$(c$(i), 1) = "2" THEN v(i) = 2

IF LEFT$(c$(i), 1) = "3" THEN v(i) = 3

IF LEFT$(c$(i), 1) = "4" THEN v(i) = 4

IF LEFT$(c$(i), 1) = "5" THEN v(i) = 5

IF LEFT$(c$(i), 1) = "6" THEN v(i) = 6

IF LEFT$(c$(i), 1) = "7" THEN v(i) = 7

IF LEFT$(c$(i), 1) = "8" THEN v(i) = 8

IF LEFT$(c$(i), 1) = "9" THEN v(i) = 9

IF LEFT$(c$(i), 1) = "1" THEN v(i) = 10

IF LEFT$(c$(i), 1) = "J" THEN v(i) = 11

IF LEFT$(c$(i), 1) = "Q" THEN v(i) = 12

IF LEFT$(c$(i), 1) = "K" THEN v(i) = 13

IF LEFT$(c$(i), 1) = "A" THEN v(i) = 14

NEXT i

FOR a = 1 TO 2

FOR i = 1 TO 51

deck$(a, i) = deck$(a, i + 1)

NEXT i

deck$(a, 52) = ""

NEXT a

RETURN

nocards:

IF deck$(1, 1) = "" AND deck$(2, 1) <> "" AND deck$(3, 1) <> "" THEN p = 1: CALL DBD(deck$(), p)

IF deck$(1, 1) = "" AND deck$(2, 1) <> "" AND deck$(3, 1) = "" THEN PRINT "player 1 wins": END

IF deck$(1, 1) <> "" AND deck$(2, 1) = "" AND deck$(4, 1) <> "" THEN p = 2: CALL DBD(deck$(), p)

IF deck$(1, 1) <> "" AND deck$(2, 1) = "" AND deck$(4, 1) = "" THEN PRINT "player 2 wins": END

IF deck$(1, 1) = "" AND deck$(2, 1) = "" AND deck$(3, 1) = "" AND deck$(4, 1) = "" THEN PRINT "complete tie!!!": END

RETURN

SUB DBD (deck$(), p)

FOR i = 1 TO 52

deck$(p, i) = deck$(p + 2, i)

deck$(p + 2, i) = ""

NEXT i

END SUB

SUB shuffle (deck$())

CLS

RANDOMIZE TIMER

DIM cards$(52)

DIM suit$(4)

suit$(1) = "clubs"

suit$(2) = "spades"

suit$(3) = "diamonds"

suit$(4) = "hearts"

DIM type$(13)

FOR i = 1 TO 9

type$(i) = STR$(i + 1)

NEXT i

type$(10) = "Jack"

type$(11) = "Queen"

type$(12) = "King"

type$(13) = "Ace"

i = 0

FOR suit = 1 TO 4

FOR tyype = 1 TO 13

i = i + 1

cards$(i) = "" + type$(tyype) + " of " + suit$(suit)

NEXT tyype

NEXT suit

FOR k = 1 TO (RND * 7) + 4

FOR i = 1 TO 52

j = INT(RND * 52) + 1

SWAP cards$(i), cards$(j)

NEXT i

NEXT k

j = 0

FOR i = 1 TO 52 STEP 2

j = j + 1

deck$(1, j) = cards$(i)

deck$(2, j) = cards$(i + 1)

NEXT i

END SUB