Novità

Per Tutti

Ciao a Tutti

Ho modificato quello di Joe, ho tolto le visualizzazioni e ho inserito
ImpostaGiocata, poi per poterla provare gli ho messo qualche estrazione
e una ruota e va bene

Lo script

Codice:
Option Explicit
Sub Main
   Dim Es,R1,ini,Fin,Ru(2),Posta(2),Ambo(2)
   Dim A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,A15,A16
   Dim Re1,Re2,Re3,Re4,Re5,Re6,Re7,Re8,Re9,Re10,Re11,Re12,Re13,Re14,Re15,Re16
   Dim L(16),T(89,90)
   Dim I,K,Z,V,K1,Caso
   Dim Nu(2)
   R1 = BA_
   Ru(1) = R1 : Ru(2) = TT_
   Posta(2) = 1
   A1 = 63 : Re1 = 06
   A2 = 83 : Re2 = 88
   A3 = 35 : Re3 = 72
   A4 = 29 : Re4 = 40
   A5 = 06 : Re5 = 42
   A6 = 72 : Re6 = 70
   A7 = 33 : Re7 = 86
   A8 = 63 : Re8 = 06
   A9 = 06 : Re9 = 63
   A10 = 39 : Re10 = 64
   A11 = 59 : Re11 = 58
   A12 = 63 : Re12 = 06
   A13 = 30 : Re13 = 40
   A14 = 40 : Re14 = 28
   A15 = 10 : Re15 = 10
   A16 = 06 : Re16 = 62
   '  Scrivi " SITUAZIONE INIZIALE " & Chr(13),1
   L(1) = A1 & Re1
   L(2) = A2 & Re2
   L(3) = A3 & Re3
   L(4) = A4 & Re4
   L(5) = A5 & Re5
   L(6) = A6 & Re6
   L(7) = A7 & Re7
   L(8) = A8 & Re8
   L(9) = A9 & Re9
   L(10) = A10 & Re10
   L(11) = A11 & Re11
   L(12) = A12 & Re12
   L(13) = A13 & Re13
   L(14) = A14 & Re14
   L(15) = A15 & Re15
   L(16) = A16 & Re16
   ini = 10660
   Fin = EstrazioneFin
   For Es = ini To Fin
      Caso = Caso + 1
      Scrivi String(80,"*") & " Estrazione " &(Es) & " caso " & FormattaStringa(Caso,"0000"),1,,,1
      Scrivi(" Estrazione n." & Format2(Es) & " del " & DataEstrazione(Es)),1,0
      Scrivi "  " & SiglaRuota(R1) & " " & StringaEstratti(Es,R1),1,0
      For I = 1 To UBound(L)
         Nu(1) = CInt(Left(L(I),2))
         Nu(2) = CInt(Right(L(I),2))
         If Nu(1) <> Nu(2) Then
            '  Scrivi I & " ) " & StringaNumeri(Nu,,True)
            If T(Minimo(Nu(1),Nu(2)),Massimo(Nu(1),Nu(2))) = False Then K1 = K1 + 1
            T(Minimo(Nu(1),Nu(2)),Massimo(Nu(1),Nu(2))) = True
         Else
            Scrivi 'I & ") Scarto " & StringaNumeri(Nu)
         End If
      Next
      Scrivi
      ' Scrivi "Saranno " & K1,True
      Scrivi
      ' Scrivi "AMBI CORRETTI e ORDINATI " & Chr(13),1
      K = 0
      For V = 1 To 89
         For Z = V + 1 To 90
            If T(V,Z) = True Then
               K = K + 1
               '  Scrivi "Ambo(" & K & ") = """,0,0
               '    Scrivi Format2(V) & "." & Format2(Z) & """"
               Ambo(1) = V : Ambo(2) = Z
               ImpostaGiocata K,Ambo,Ru,Posta,10
               Gioca Es,1
            End If
         Next
      Next
   Next
End Sub

Tolgo le estrazioni, la ruota, la posta, anche la prima parte dove ci sono memorizzati i numeri
perche nell'altro script sono già memorizzati in A1 e Re1 ecc...

Lo lancio e mi esce questo errore

Cattura.PNG

Non sapendo dove intervenire Ho provato a fare qualche modifica
ma ho peggiorato lo script, se necessario posto lo script completo
 
Ultima modifica:
Ciao Salvo,

è quasi sicuramente dovuto ad un errore nel trasferire i numeri tra le varie parti dello script.

Penso tu abbia compreso come funziona quanto ti ho inviato.

Ti avevo proposto di utilizzare solo "la parte centrale" dello script.

Cioè nello stesso istante in cui convalidi l'Ambo effettui la giocata ed avendolo convalidato lo escludi.

Cioè facendo escludi gli ambi già utilizzati ... da ogni possibile convalida eventualmente successiva.

Ergo qualsiasi ambo lo potrai giocare una sola volta (per estrazione).

Però sarà necessario pulire la matrice ad ogni estrazione (con ReDim) riabilitando tutti gl Ambi possibili.

Per tentare una soluzione, al problema di funzionamento da te lamentato, si deve verificare se i dati che hai,

sono interfacciati e/o trasferiti correttamente, prima al convalidarli e giocarli.

Secondo me il problema è di incompatibilità tra le varie organizzazioni dei dati.

Giusto il consiglio di Franco riguardo all'organizzarli meglio.

Per ora ti propongo le modifiche appena suggerite.

Codice:
Option Explicit
Sub Main
   Dim Es,R1,ini,Fin,Ru(2),Posta(2),Ambo(2)
   Dim A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,A15,A16
   Dim Re1,Re2,Re3,Re4,Re5,Re6,Re7,Re8,Re9,Re10,Re11,Re12,Re13,Re14,Re15,Re16
   Dim L(16)
   Dim I,K,Z,V,K1,Caso
   Dim Nu(2)
   R1 = BA_
   Ru(1) = R1 : Ru(2) = TT_
   Posta(2) = 1
   A1 = 63 : Re1 = 06
   A2 = 83 : Re2 = 88
   A3 = 35 : Re3 = 72
   A4 = 29 : Re4 = 40
   A5 = 06 : Re5 = 42
   A6 = 72 : Re6 = 70
   A7 = 33 : Re7 = 86
   A8 = 63 : Re8 = 06
   A9 = 06 : Re9 = 63
   A10 = 39 : Re10 = 64
   A11 = 59 : Re11 = 58
   A12 = 63 : Re12 = 06
   A13 = 30 : Re13 = 40
   A14 = 40 : Re14 = 28
   A15 = 10 : Re15 = 10
   A16 = 06 : Re16 = 62
   '  Scrivi " SITUAZIONE INIZIALE " & Chr(13),1
   L(1) = A1 & Re1
   L(2) = A2 & Re2
   L(3) = A3 & Re3
   L(4) = A4 & Re4
   L(5) = A5 & Re5
   L(6) = A6 & Re6
   L(7) = A7 & Re7
   L(8) = A8 & Re8
   L(9) = A9 & Re9
   L(10) = A10 & Re10
   L(11) = A11 & Re11
   L(12) = A12 & Re12
   L(13) = A13 & Re13
   L(14) = A14 & Re14
   L(15) = A15 & Re15
   L(16) = A16 & Re16
   ini = 10660
   Fin = EstrazioneFin
   For Es = ini To Fin
   ReDim T(90,90)
   K1 = 0
      Caso = Caso + 1
      Scrivi String(80,"*") & " Estrazione " &(Es) & " caso " & FormattaStringa(Caso,"0000"),1,,,1
      Scrivi(" Estrazione n." & Format2(Es) & " del " & DataEstrazione(Es)),1,0
      Scrivi "  " & SiglaRuota(R1) & " " & StringaEstratti(Es,R1),1,0
      For I = 1 To UBound(L)
         Nu(1) = CInt(Left(L(I),2))
         Nu(2) = CInt(Right(L(I),2))
         If Nu(1) <> Nu(2) Then
            Call OrdinaMatrice(Nu,1)
            If T(Nu(1),Nu(2)) = False Then
               K1 = K1 + 1
               T(Nu(1),Nu(2)) = True
               'Scrivi K & " " & StringaNumeri(Nu,,True)
               ImpostaGiocata K1 ,Nu,Ru,Posta,10
             
            End If
         End If
      
      Next
     If K1 >0 Then Gioca Es,True
   Next
End Sub

:)
 
Ultima modifica:
Ciao a Tutti

Adesso non gli piace Nu, l'ho messo anche con Redim, ma va sempre in errore,
però una curiosità, se gli imposto Redim Nu(90), non va in errore e completa lo
script, fa solo il primo ambo, gli altri 15 non li vede, ti posto lo script completo.

Codice:
Option Explicit
Sub Main
   Dim FIn,Ini,A,B,C,D,Clp,Es,Salvo50,I,K1
   Dim R1,R2,P1,P2,P3,P4,P5,E1,Caso,Casi
   Dim SomOr1,SomOr2,DistVe1,DistVe2,DistDi1,DistDi2
   Dim M4x90,M4x90M1,M1x90,M1x90M4,M2x90,M2x90M3,M3x90,M3x90M2
   Dim Tot1,Tot2,Diff,Resto7,Resto13,Tot7,Tot13,X7,X13
   Dim Tot7x2,Tot7x4,Tot13x3,Tot13x9,Tot27,Tot272,Tot2724
   Dim Tot17,Tot172,Tot1724,Tot213,Tot2133,Tot21339
   Dim Tot113,Tot1133,Tot11339,Visuale
   Dim A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14,A15,A16
   Dim Re1,Re2,Re3,Re4,Re5,Re6,Re7,Re8,Re9,Re10,Re11,Re12,Re13,Re14,Re15,Re16
   ' Dim Ambo1(2),Ambo2(2),Ambo3(2),Ambo4(2),Ambo5(2),Ambo6(2)
   ' Dim Ambo7(2),Ambo8(2),Ambo9(2),Ambo10(2),Ambo11(2)
   ' Dim Ambo12(2),Ambo13(2),Ambo14(2),Ambo15(2),Ambo16(2)
   Dim Ru(2),Posta(2),M(4),L(16),Ambo(2)
   Posta(2) = 1
   FIn = EstrazioneFin
   Ini = CInt(InputBox("Inserisci l'estrazione che vuoi iniziare",Salvo50,10660))'estrazione 6136 nell'esempio
   Clp = CInt(InputBox("Inserisci i Colpi di Gioco per l'ambata",Salvo50,10))
   Visuale = CInt(InputBox(" Se vuoi visualizzare i calcoli metti 1, altrimenti metti un qualsiasi altro numero ",Salvo50,1))
   'Call ScegliRange(Ini,FIn,Ini,FIn)
   Scrivi Space(8) & " La Tavola Delle Progressioni Armoniche di D. Manna - Script Salvo50" & Space(8),1,,4,,3,,1
   ResetTimer
   For Es = Ini To FIn
      Messaggio Es & "     Tempo Trascorso " & TempoTrascorso
      AvanzamentoElab Ini,FIn,Es
      Caso = 0
      For R1 = 1 To 10
         For P1 = 1 To 2
            For P2 = P1 + 1 To 3
               For P3 = P2 + 1 To 4
                  For P4 = P3 + 1 To 5
                     A = Estratto(Es,R1,P1)
                     B = Estratto(Es,R1,P2)
                     C = Estratto(Es,R1,P3)
                     D = Estratto(Es,R1,P4)
                     If A > 0 Then
                        M(1) = A : M(2) = B : M(3) = C : M(4) = D
                        Call OrdinaMatrice(M,1)
                        'M4--M1
                        '|   |
                        'M3--M2
                        SomOr1 = Fuori90(M(4) + M(1)) : SomOr2 = Fuori90(M(3) + M(2))
                        If SomOr1 = SomOr2 Then
                           DistVe1 = Distanza(M(4),M(3)) : DistVe2 = Distanza(M(1),M(2))
                           If DistVe1 = DistVe2 Then
                              DistDi1 = Distanza(M(4),M(2)) : DistDi2 = Distanza(M(1),M(3))
                              If DistDi1 = DistDi2 Then
                                 'Trasformazione Degli Ambi, Secondo il Senso Orario e L'equivalenza Delle Somme in Sistema Novantesimale
                                 M4x90 =(M(4) * 90) : M4x90M1 =(M4x90 + M(1)) : M1x90 =(M(1) * 90) : M1x90M4 =(M1x90 + M(4))
                                 M2x90 =(M(2) * 90) : M2x90M3 =(M2x90 + M(3)) : M3x90 =(M(3) * 90) : M3x90M2 =(M3x90 + M(2))
                                 '
                                 Tot1 = FuoriX((M4x90M1 + M2x90M3),8100)
                                 Tot2 = FuoriX((M1x90M4 + M3x90M2),8100)
                                 Diff = Differenza(Tot1,Tot2)
                                 'Inizio calcoli per la divisione per 7
                                 Resto7 = Diff Mod 7
                                 If Resto7 = 0 Then
                                    Tot7 = Diff / 7
                                 Else
                                    X7 = 7 - Resto7
                                    X7 = X7 * 8100
                                    X7 = X7 + Diff
                                    Tot7 = X7 / 7
                                 End If
                                 'Inizio calcoli per la divisione per 13
                                 Resto13 = Diff Mod 13
                                 If Resto13 = 0 Then
                                    Tot13 = Diff / 13
                                 Else
                                    X13 = 13 - Resto13
                                    X13 = X13 * 8100
                                    X13 = X13 + Diff
                                    Tot13 = X13 / 13
                                 End If
                                 'Fine calcoli per la divisione per 13
                                 Tot7x2 = FuoriX((Tot7 * 2),8100) : Tot7x4 = FuoriX((Tot7 * 4),8100)' progressioni del 7
                                 Tot13x3 = FuoriX((Tot13 * 3),8100) : Tot13x9 = FuoriX((Tot13 * 9),8100)'progressioni del 13
                                 'Calcolo progressioni Ascendenti Del 7
                                 Tot27 = FuoriX((Tot2 + Tot7),8100)
                                 Tot272 = FuoriX((Tot27 + Tot7x2),8100)
                                 Tot2724 = FuoriX((Tot272 + Tot7x4),8100)
                                 'Calcolo progressioni Discendenti Del 7
                                 Tot17 = FuoriX((8100 + Tot1 - Tot7),8100)
                                 Tot172 = FuoriX((8100 + Tot17 - Tot7x2),8100)
                                 Tot1724 = FuoriX((8100 + Tot172 - Tot7x4),8100)
                                 'Calcolo progressioni Ascendenti Del 13
                                 Tot213 = FuoriX((Tot2 + Tot13),8100)
                                 Tot2133 = FuoriX((Tot213 + Tot13x3),8100)
                                 Tot21339 = FuoriX((Tot2133 + Tot13x9),8100)
                                 'Calcolo progressioni Discendenti Del 13
                                 Tot113 = FuoriX((8100 + Tot1 - Tot13),8100)
                                 Tot1133 = FuoriX((8100 + Tot113 - Tot13x3),8100)
                                 Tot11339 = FuoriX((8100 + Tot1133 - Tot13x9),8100)
                                 'Calcolo pronostico Ambi settenari ascendenti
                                 A1 = Tot2\ 90 : Re1 = Tot2 Mod 90
                                 If Re1 = 0 Then Re1 = 90
                                 A2 = Tot27\ 90 : Re2 = Tot27 Mod 90
                                 If Re2 = 0 Then Re2 = 90
                                 A3 = Tot272\ 90 : Re3 = Tot272 Mod 90
                                 If Re3 = 0 Then Re3 = 90
                                 A4 = Tot2724\ 90 : Re4 = Tot2724 Mod 90
                                 If Re4 = 0 Then Re4 = 90
                                 'Calcolo pronostico Ambi settenari discendenti
                                 A9 = Tot1\ 90 : Re9 = Tot1 Mod 90
                                 If Re9 = 0 Then Re9 = 90
                                 A10 = Tot17\ 90 : Re10 = Tot17 Mod 90
                                 If Re10 = 0 Then Re10 = 90
                                 A11 = Tot172\ 90 : Re11 = Tot172 Mod 90
                                 If Re11 = 0 Then Re11 = 90
                                 A12 = Tot2\ 90 : Re12 = Tot2 Mod 90
                                 If Re12 = 0 Then Re12 = 90
                                 'Calcolo pronostico Ambi tredicesimali ascendenti
                                 A5 = Tot2\ 90 : Re5 = Tot2 Mod 90
                                 If Re5 = 0 Then Re5 = 90
                                 A6 = Tot213\ 90 : Re6 = Tot213 Mod 90
                                 If Re6 = 0 Then Re6 = 90
                                 A7 = Tot2133\ 90 : Re7 = Tot2133 Mod 90
                                 If Re7 = 0 Then Re7 = 90
                                 A8 = Tot1\ 90 : Re8 = Tot1 Mod 90
                                 If Re8 = 0 Then Re8 = 90
                                 'Calcolo pronostico Ambi tredicesimali discendenti
                                 A13 = Tot1\ 90 : Re13 = Tot1 Mod 90
                                 If Re13 = 0 Then Re13 = 90
                                 A14 = Tot113\ 90 : Re14 = Tot113 Mod 90
                                 If Re14 = 0 Then Re14 = 90
                                 A15 = Tot1133\ 90 : Re15 = Tot1133 Mod 90
                                 If Re15 = 0 Then Re15 = 90
                                 A16 = Tot11339\ 90 : Re16 = Tot11339 Mod 90
                                 If Re16 = 0 Then Re16 = 90
                                 '
                                 Caso = Caso + 1
                                 Casi = Casi + 1
                                 Scrivi String(89,"*") & " Casi Totali " & FormattaStringa(Casi,"0000"),1,,,2
                                 Scrivi String(80,"*") & " Estrazione " &(Es) & " caso " & FormattaStringa(Caso,"0000"),1,,,1
                                 Scrivi(" Estrazione n." & Format2(Es) & " del " & DataEstrazione(Es)),1,0
                                 Scrivi "  " & SiglaRuota(R1) & " ",1,0
                                 For P5 = 1 To 5
                                    E1 = Estratto(Es,R1,P5)
                                    If E1 = A Or E1 = B Or E1 = C Or E1 = D Then
                                       ColoreTesto 2
                                    Else
                                       ColoreTesto 0
                                    End If
                                    Scrivi Format2(E1) & " ",1,0
                                    ColoreTesto 0
                                 Next
                                 Scrivi
                                 Scrivi
                                 If Visuale = 1 Then
                                    Scrivi Space(32) & " (In Ogni Gruppo Numeri Uguali)",1,,,1
                                    Scrivi Space(10) & " Quadrato in " & Space(8) & "Somme " & Space(6) & " Distanze ",1,0
                                    Scrivi Space(4) & " Distanze ",1
                                    Scrivi Space(10) & "Senso Orario " & Space(5) & "Orizzontali" & Space(5),1,0
                                    Scrivi "Verticali     Diagonali",1
                                    Scrivi Space(13) & Format2(M(4)) & " " & Format2(M(1)) & Space(14) & Format2(SomOr1),1,0
                                    Scrivi Space(13) & Format2(DistVe1) & Space(12) & Format2(DistDi1),1
                                    Scrivi Space(13) & Format2(M(3)) & " " & Format2(M(2)) & Space(14) & Format2(SomOr2),1,0
                                    Scrivi Space(13) & Format2(DistVe2) & Space(12) & Format2(DistDi2),1
                                    Scrivi
                                    Scrivi "Trasformazione Degli Ambi, Secondo il Senso Orario e L'equivalenza Delle Somme in Sistema Novantesimale ",1,,,1
                                    Scrivi
                                    Scrivi Space(10) & Format2(M(4)) & " * 90 = " & Format2(M4x90) & " + ",1,0
                                    Scrivi Format2(M(1)) & " = " & Format2(M4x90M1) & Space(3) & " Inversione ",1,0
                                    Scrivi Space(3) & Format2(M(1)) & " * 90 = " & Format2(M1x90) & " + ",1,0
                                    Scrivi Format2(M(4)) & " = " & Format2(M1x90M4),1
                                    'Scrivi
                                    Scrivi Space(10) & Format2(M(2)) & " * 90 = " & Format2(M2x90) & " + ",1,0
                                    Scrivi Format2(M(3)) & " = " & Format2(M2x90M3) & Space(3) & " Inversione ",1,0
                                    Scrivi Space(3) & Format2(M(3)) & " * 90 = " & Format2(M3x90) & " + ",1,0
                                    Scrivi Format2(M(2)) & " = " & Format2(M3x90M2),1
                                    Scrivi
                                    Scrivi Space(64) & " Differenza ",1
                                    Scrivi Space(10) & Format2(M4x90M1) & " + " & Format2(M2x90M3) & " = ",1,0
                                    Scrivi Format2(Tot1),1,0
                                    Scrivi Space(8) & Format2(M1x90M4) & " + " & Format2(M3x90M2) & " = ",1,0
                                    Scrivi Format2(Tot2),1,0
                                    Scrivi Space(8) & Format2(Tot1) & " - " & Format2(Tot2) & " = ",1,0
                                    Scrivi Format2(Diff),1
                                    Scrivi
                                    Scrivi Space(9) & " Differenza diviso 7 ",1,0,,1
                                    Scrivi Space(5) & " Formazione delle progressioni armoniche del 7",1,,,1
                                    Scrivi Space(12) & Format2(Diff) & " / 07 = " & Format2(Tot7),1,0
                                    Scrivi Space(15) & Format2(Tot7) & Space(10) & Format2(Tot7x2) & Space(10) & Format2(Tot7x4),1
                                    Scrivi
                                    Scrivi Space(9) & " Differenza diviso 13 ",1,0,,2
                                    Scrivi Space(4) & " Formazione delle progressioni armoniche del 13",1,,,2
                                    Scrivi Space(12) & Format2(Diff) & " / 13 = " & Format2(Tot13),1,0
                                    Scrivi Space(15) & Format2(Tot13) & Space(10) & Format2(Tot13x3) & Space(10) & Format2(Tot13x9),1
                                    Scrivi
                                    Scrivi Space(9) & " Progressione Armonica Ascendente del 7",1,,,1
                                    Scrivi Space(10) & "(" & Format2(Tot2) & ") + " & Format2(Tot7) & " = (" & Format2(Tot27),1,0
                                    Scrivi ") + " & Format2(Tot7x2) & " = (" & Format2(Tot272) & ") + " & Format2(Tot7x4),1,0
                                    Scrivi " = (" & Format2(Tot2724) & ")",1
                                    Scrivi
                                    Scrivi Space(9) & " Progressione Armonica Ascendente del 13",1,,,2
                                    Scrivi Space(10) & "(" & Format2(Tot2) & ") + " & Format2(Tot13) & " = (" & Format2(Tot213),1,0
                                    Scrivi ") + " & Format2(Tot13x3) & " = (" & Format2(Tot2133) & ") + " & Format2(Tot13x9),1,0
                                    Scrivi " = (" & Format2(Tot21339) & ")",1
                                    Scrivi
                                    Scrivi Space(9) & " Progressione Armonica Discendente del 7",1,,,1
                                    Scrivi Space(10) & "(" & Format2(Tot1) & ") - " & Format2(Tot7) & " = (" & Format2(Tot17),1,0
                                    Scrivi ") - " & Format2(Tot7x2) & " = (" & Format2(Tot172) & ") - " & Format2(Tot7x4),1,0
                                    Scrivi " = (" & Format2(Tot1724) & ")",1
                                    Scrivi
                                    Scrivi Space(9) & " Progressione Armonica Discendente del 13",1,,,2
                                    Scrivi Space(10) & "(" & Format2(Tot1) & ") - " & Format2(Tot13) & " = (" & Format2(Tot113),1,0
                                    Scrivi ") - " & Format2(Tot13x3) & " = (" & Format2(Tot1133) & ") - " & Format2(Tot13x9),1,0
                                    Scrivi " = (" & Format2(Tot11339) & ")",1
                                    Scrivi
                                 End If
                                 Scrivi Space(10) & " Pronostico Ambi settenari " & Space(8) & " Pronostico Ambi Tredicesimali",1,,,1
                                 Scrivi Space(10) & "Ascendenti" & Space(6) & "Discendenti",1,0
                                 Scrivi Space(10) & "Ascendenti" & Space(6) & "Discendenti",1
                                 Scrivi Space(12) & Format2(A1) & " " & Format2(Re1),1,0
                                 Scrivi Space(11) & Format2(A9) & " " & Format2(Re9),1,0
                                 Scrivi Space(16) & Format2(A5) & " " & Format2(Re5),1,0
                                 Scrivi Space(11) & Format2(A13) & " " & Format2(Re13),1
                                 Scrivi Space(12) & Format2(A2) & " " & Format2(Re2),1,0
                                 Scrivi Space(11) & Format2(A10) & " " & Format2(Re10),1,0
                                 Scrivi Space(16) & Format2(A6) & " " & Format2(Re6),1,0
                                 Scrivi Space(11) & Format2(A14) & " " & Format2(Re14),1
                                 Scrivi Space(12) & Format2(A3) & " " & Format2(Re3),1,0
                                 Scrivi Space(11) & Format2(A11) & " " & Format2(Re11),1,0
                                 Scrivi Space(16) & Format2(A7) & " " & Format2(Re7),1,0
                                 Scrivi Space(11) & Format2(A15) & " " & Format2(Re15),1
                                 Scrivi Space(12) & Format2(A4) & " " & Format2(Re4),1,0
                                 Scrivi Space(11) & Format2(A12) & " " & Format2(Re12),1,0
                                 Scrivi Space(16) & Format2(A8) & " " & Format2(Re8),1,0
                                 Scrivi Space(11) & Format2(A16) & " " & Format2(Re16),1
                                 Scrivi
                                 Ru(1) = R1 : Ru(2) = TT_
                                 L(1) = A1 & Re1
                                 L(2) = A2 & Re2
                                 L(3) = A3 & Re3
                                 L(4) = A4 & Re4
                                 L(5) = A5 & Re5
                                 L(6) = A6 & Re6
                                 L(7) = A7 & Re7
                                 L(8) = A8 & Re8
                                 L(9) = A9 & Re9
                                 L(10) = A10 & Re10
                                 L(11) = A11 & Re11
                                 L(12) = A12 & Re12
                                 L(13) = A13 & Re13
                                 L(14) = A14 & Re14
                                 L(15) = A15 & Re15
                                 L(16) = A16 & Re16
                                 ReDim T(90,90)
                                 ReDim Nu(2)
                                 K1 = 0
                                 For I = 1 To UBound(L)
                                    Nu(1) = CInt(Left(L(I),2))
                                    Nu(2) = CInt(Right(L(I),2))
                                    If Nu(1) <> Nu(2) Then
                                       Call OrdinaMatrice(Nu,1)
                                       If T(Nu(1),Nu(2)) = False Then
                                          K1 = K1 + 1
                                          T(Nu(1),Nu(2)) = True
                                          'Scrivi K & " " & StringaNumeri(Nu,,True)
                                          ImpostaGiocata K1,Nu,Ru,Posta,Clp,2
                                       End If
                                    End If
                                 Next
                                 If K1 > 0 Then Gioca Es,True
                              End If
                           End If
                        End If
                     End If
                  Next
               Next
            Next
         Next
      Next
      If ScriptInterrotto Then Exit Sub
   Next
   ScriviResoconto
   Scrivi TempoTrascorso
End Sub
 
Si nella primissima versione avevo dimensionato al matrice Ambi (89,90)

Perché è giusto che sia così.

Però se l'Ambo arriva capovolto (tipo 90.10) giustamente compare il messaggio di errore,

Che è relativo alla dimensione del contenitore che risulta troppo piccolo.

Per la giocata, avevi scritto Gioca Es per ogni singolo Ambo.

Io diversamente prima ho raccolto tutti i pronostici ed in ultimo eseguito una sola volta Gioca Es.

Invece delle 10/12/15 ovvero quante giocate possono essere.

In pratica per funzionare correttamente Gioca Es, deve avere la stessa indentazione,

cioè deve essere allo stesso livello e nello stesso ciclo primario del For Es = Ini to Fin / Next.

Altrimenti tutti i cicli più interni con maggiore indentazione escludono alcune delle giocate.

Sino ad arrivare all'ultimo dove se ne effettua una sola come avevi fatto tu.

:)

PS:

Per debuggare lo script e trovare l'errore ho inserito un msgbox.

Codice:
                                 ReDim T(90,90)
                                 ReDim Nu(2)
                                 K1 = 0
                                 For I = 1 To UBound(L)
                                    Nu(1) = CInt(Left(L(I),2))
                                    Nu(2) = CInt(Right(L(I),2))
                                    If Nu(1) <> Nu(2) Then
                                    MsgBox (StringaNumeri (Nu,,True))
                                       Call OrdinaMatrice(Nu,1)

Eseguendo lo script con archivio aggiornato all'Estrazione 10667,

dopo aver confermato il primo lotto di numeri, all'inizio del secondo,

appare un 97 e subito dopo lo script crolla.

:)
 
Ultima modifica:
Ok, devo mettere il fuori90

Ciao Salvo.

No la faccenda è più complicata.

Quando hai dato il primo elenco i numeri erano tutti in doppia cifra.

Eventualmente separati da uno spazio, un punto o quant'altro.

Quindi prendendo le primi 2 e le ultime cifre, della stringa che li rappresenta come Ambo ... funziona.

Se invece la stringa è di 3 cifre e se c'è un 9 centrale,

uno dei 2 numeri diventa maggiore di 90 ... e da questo dipende l'errore.

Dunque con il Fuori90, come sempre, si risolvono "problemi", creati altrove.

1750245735591.png
:)
 
Ok, Joe problema risolto io per il momento ho messo Fuori90 e va bene
un Grazie immenso a te
anche a Cinzia che specialmente nel suo secondo script
mi ha fatto capire perchè si può usare OrdinaMatrice
ed un grazie anche a FrancoBru che mi ha fatto capire
perchè gli ambi si devono invertire
 
Ultima modifica:

Ultima estrazione Lotto

  • Estrazione del lotto
    giovedì 19 giugno 2025
    Bari
    32
    64
    67
    30
    17
    Cagliari
    39
    56
    77
    12
    35
    Firenze
    11
    16
    59
    72
    02
    Genova
    80
    79
    05
    03
    33
    Milano
    09
    87
    23
    88
    82
    Napoli
    56
    74
    85
    16
    61
    Palermo
    84
    21
    08
    18
    85
    Roma
    71
    84
    20
    54
    86
    Torino
    28
    36
    68
    49
    53
    Venezia
    14
    45
    39
    43
    42
    Nazionale
    73
    11
    46
    20
    26
    Estrazione Simbolotto
    Napoli
    43
    35
    11
    26
    40

Ultimi Messaggi

Indietro
Alto