Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 58 lines (56 sloc) 1.668 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
<%
'Get rid of old values
Erase arrInfantry
Erase arrElite1
Erase arrElite2
Erase arrElite3
Erase arrTransports

'Get info for attacking units
RSAM.Open "SELECT * FROM ATTACKING WHERE UserName = '" & UserNameM & "'", Conn, adOpenStatic, adLockReadOnly
If RSAM.EOF = FALSE Then
Do While RSAM.EOF = FALSE
iIndex = DateDiff("h", Now(), RSAM("Time"))
arrInfantry(iIndex) = arrInfantry(iIndex) + RSAM("Soldiers")
arrElite1(iIndex) = arrElite1(iIndex) + RSAM("Elite1")
arrElite2(iIndex) = arrElite2(iIndex) + RSAM("Elite2")
arrElite3(iIndex) = arrElite3(iIndex) + RSAM("Elite3")
arrTransports(iIndex) = arrTransports(iIndex) + RSAM("Transports")
RSAM.MoveNext
Loop
RSAM.MoveFirst
RSAM.Close
End If

'Fill in empty spaces
TotInfantry = 0
TotElite1 = 0
TotElite2 = 0
TotElite3 = 0
TotTransports = 0
For iIndex = 0 to 17
If arrInfantry(iIndex) = "" OR arrInfantry(iIndex) = "0" Then
arrInfantry(iIndex) = "-"
Else
TotInfantry = TotInfantry + arrInfantry(iIndex) + 0
End If
If arrElite1(iIndex) = "" OR arrElite1(iIndex) = "0" Then
arrElite1(iIndex) = "-"
Else
TotElite1 = TotElite1 + arrElite1(iIndex) + 0
End If
If arrElite2(iIndex) = "" OR arrElite2(iIndex) = "0" Then
arrElite2(iIndex) = "-"
Else
TotElite2 = TotElite1 + arrElite2(iIndex) + 0
End If
If arrElite3(iIndex) = "" OR arrElite3(iIndex) = "0" Then
arrElite3(iIndex) = "-"
Else
TotElite3 = TotElite3 + arrElite3(iIndex) + 0
End If
If arrTransports(iIndex) = "" OR arrTransports(iIndex) = "0" Then
arrTransports(iIndex) = "-"
Else
TotTransports = TotTransports + arrTransports(iIndex) + 0
End If
Next
%>
Something went wrong with that request. Please try again.