Novità

help errore script

Alien.

Advanced Premium Member
[Sub Main()
' AMBATE SOMMATIVE: 2 ESTRATTI + FISSO
Dim som(5,5,90)
Dim estr(2,5)
Dim Val(5,5,90)
Dim amb(90)
n = EstrazioneFin
z = 0
ultest = n
r2 = InputBox("Inserisci la ruota su cui effettuare la ricerca(1-12):",,1)
If r2 = "" Then Exit Sub
r2 = CInt(r2)
es = InputBox("Inserisci 0 per l'ultima, 1 la prima, 2 la seconda, ecc. (0-8):",,1)'---> CAMBIARE CON INDICE A SCELTA
If es = "" Then Exit Sub
es = CInt(es)
nmc = InputBox("Numero di mesi da considerare:",,5)'---> CAMBIARE CON MESI/CASI DI CONTROLLO A RITROSO
If nmc = "" Then Exit Sub
nmc = CInt(nmc)
perc = InputBox("Inserisci la percentuale (0-100):",,99)
If perc = "" Then Exit Sub
perc = CInt(perc)
ncg = InputBox("Inserisci il numero di colpi(0 per un mese):",,3)
If ncg = "" Then Exit Sub
ncg = CInt(ncg)
While z < nmc
If es = 0 And n = ultest Or IndiceMensile(n) = es And es > 0 Or IndiceMensile(n + 1) = 1 And es = 0 Then z = z + 1
n = n - 1
Wend
nn = n + 1
Erase amb
ColoreTesto 1
If es = 0 Then s = "ALL'ULTIMA DEL MESE " Else s = "ALLA " & es
s = s & "°ESTRAZIONE DEL MESE PER "
If ncg = 0 Then
s = s & "UN MESE:"
Else
If ncg = 1 Then
s = s & ncg & " COLPO:"
Else s = s & ncg & " COLPI:"
End If
End If
Scrivi s & Chr(10) & "STATISTICA DAL " & DataEstrazione(nn) & _
" al " & DataEstrazione(EstrazioneFin),1
ColoreTesto 0
Scrivi
Scrivi "==============================================================================================",1
For ru1 = 1 To 9
For ru2 = 1 To 10
If ru2 = 11 Then ru2 = 12
Messaggio " Elaboro la ruota n° " & ru1 & " con la n° " & ru2
z = 0
Erase som
Erase estr
'-----------------------------------------------
For n = nn To EstrazioneFin
If es = 0 Then m = n + 1 Else m = n End If
'---------------------------------deve essere una riga unica
If es = 0 And n = ultest Or IndiceMensile(m) = es And es > 0 Or IndiceMensile(m) = 1 And es = 0 Then
'-----------------------------------------------------------
z = z + 1
For i = 1 To 5
estr(1,i) = Estratto(n,ru1,i)
estr(2,i) = Estratto(n,ru2,i)
Next
Erase Val
If ncg = 0 Then
k2 = 9
If IndiceMensile(n + 8) = es Then
k2 = 8
End If
Else
k2 = ncg
End If
k3 = n + k2
If k3 > EstrazioneFin Then k3 = EstrazioneFin
For nv = n + 1 To k3
For i = 1 To 5
For j = 1 To 5
For l = 1 To 5
k = Estratto(nv,r2,i) - estr(1,j) - estr(2,l)
While k <= 0
k = k + 90
Wend
If Val(j,l,k) = 0 Then
som(j,l,k) = som(j,l,k) + 1
Val(j,l,k) = 1
End If
Next
Next
Next
Next
End If
Next 'fine For n
For i = 1 To 5
For l = 1 To 5
For j = 1 To 90
zz = Int((z/100)*perc)
s = i & "° di " & FormatSpace(NomeRuota(ru1),9) & " + " & l & "° di " & _
FormatSpace(NomeRuota(ru2),10) & " + " & Format2(j)
s = s & " su " & NomeRuota(r2) & " è uscito " & Format2(som(i,l,j)) & " su " & z & ": " & _
Format2(Fuori90(estr(1,i) + estr(2,l) + j))
If Val(i,l,j) = 0 Then s = s & " in corso " Else s = s & " - "
If som(i,l,j) >= zz Then
If Not ru1 = ru2 Or ru1 = ru2 And i < l Then
Scrivi(s)
amb(Fuori90(estr(1,i) + estr(2,l) + j)) = amb(Fuori90(estr(1,i) + estr(2,l) + j)) + 1
End If
End If
Next
Next
Next
Next 'fine For ru2
Scrivi
For i = 1 To 90
If amb(i) > 1 Then
Scrivi Format2(i) & ": Previsto da " & Format2(amb(i)) & " sistemi"
End If
Next
Scrivi "==============================================================================================",1
Next 'fine For ru1
End Sub


mi da vari errori come si corregge,grazie.
 
ciao Alien a me ne dà solo 1 questo = [Sub Main()
devi togliere [ ... deve essere cosi = Sub Main()

ciao
 

Ultima estrazione Lotto

  • Estrazione del lotto
    sabato 28 marzo 2026
    Bari
    53
    04
    01
    11
    09
    Cagliari
    67
    19
    47
    35
    64
    Firenze
    13
    48
    58
    39
    15
    Genova
    52
    87
    51
    79
    67
    Milano
    07
    79
    84
    28
    37
    Napoli
    26
    90
    68
    82
    67
    Palermo
    38
    57
    65
    20
    56
    Roma
    81
    66
    45
    53
    08
    Torino
    29
    47
    55
    78
    71
    Venezia
    07
    29
    76
    14
    15
    Nazionale
    17
    10
    21
    29
    15
    Estrazione Simbolotto
    Firenze
    02
    38
    33
    11
    39

Ultimi Messaggi

Indietro
Alto