Supportnet Computer
Planet of Tech

Supportnet / Forum / Skripte(PHP,ASP,Perl...)

wo ist der Fehler ! Cih hab mich doof und dusselig gsucht...aber es ist auch soch spät :-))





Frage

Option Explicit Dim arrSuche(1) Dim aSuchwort,bSuchwort,cSuchwort,dSuchwort,eSuchwort, fSuchwort,gSuchwort,hSuchwort,iSuchwort,jSuchwort, kSuchwort,lSuchwort,mSuchwort,nSuchwort,oSuchwort, pSuchwort,qSuchwort,rSuchwort,sSuchwort,tSuchwort, uSuchwort,vSuchwort,wSuchwort,xSuchwort,ySuchwort, zSuchwort Dim z1(),z2(),z3(),z4(),z5(),z6(),z7(),z8(),z9(),z10(),z11(),z12(), z13(),z14(),z15(),z16(),z17(),z18(),z19(),z20(),z21(),z22(), z23(),z24(),z25(),z26() Dim wert_a Dim suchwort aSuchwort="a" bSuchwort="b" cSuchwort="c" dSuchwort="d" eSuchwort="e" fSuchwort="f" gSuchwort="g" hSuchwort="h" iSuchwort="i" jSuchwort="j" kSuchwort="k" lSuchwort="l" mSuchwort="m" nSuchwort="n" oSuchwort="o" pSuchwort="p" qSuchwort="q" rSuchwort="r" sSuchwort="s" tSuchwort="t" uSuchwort="u" vSuchwort="v" wSuchwort="w" xSuchwort="x" ySuchwort="y" zSuchwort="z" suchwort="v187n" arrSuche(0)=InputBox("Name:") arrSuche(1)=suchwort z1 = Filter(arrSuche, aSuchwort) z2 = Filter(arrSuche, bSuchwort) z3 = Filter(arrSuche, cSuchwort) z4 = Filter(arrSuche, dSuchwort) z5 = Filter(arrSuche, eSuchwort) z6 = Filter(arrSuche, fSuchwort) z7 = Filter(arrSuche, gSuchwort) z8 = Filter(arrSuche, hSuchwort) z9 = Filter(arrSuche, iSuchwort) z10 = Filter(arrSuche, jSuchwort) z11 = Filter(arrSuche, kSuchwort) z12 = Filter(arrSuche, lSuchwort) z13 = Filter(arrSuche, mSuchwort) z14 = Filter(arrSuche, nSuchwort) z15 = Filter(arrSuche, oSuchwort) z16 = Filter(arrSuche, pSuchwort) z17 = Filter(arrSuche, qSuchwort) z18 = Filter(arrSuche, rSuchwort) z19 = Filter(arrSuche, sSuchwort) z20 = Filter(arrSuche, tSuchwort) z21 = Filter(arrSuche, uSuchwort) z22 = Filter(arrSuche, vSuchwort) z23 = Filter(arrSuche, wSuchwort) z24 = Filter(arrSuche, xSuchwort) z25 = Filter(arrSuche, ySuchwort) z26 = Filter(arrSuche, zSuchwort) MsgBox z1(0) & arrSuche(0) if z1(0) = arrSuche(0) then wert_a = wert_a+187*187 end if If z2(0) = arrSuche(0) then wert_a = wert_a+188*188 end if If z3(0) = arrSuche(0) then wert_a = wert_a+189*189 end if If z4(0) = arrSuche(0) then wert_a = wert_a+190*190 end if If z5(0) = arrSuche(0) then wert_a = wert_a+191*191 end if If z6(0) = arrSuche(0) then wert_a = wert_a+192*192 end if If z7(0) = arrSuche(0) then wert_a = wert_a+193*193 end if If z8(0) = arrSuche(0) then wert_a = wert_a+194*194 end if If z9(0) = arrSuche(0) then wert_a = wert_a+195*195 end if If z10(0) = arrSuche(0) then wert_a = wert_a+196*196 end if If z11(0) = arrSuche(0) then wert_a = wert_a+197*197 end if If z12(0) = arrSuche(0) then wert_a = wert_a+198*198 end if If z13(0) = arrSuche(0) then wert_a = wert_a+199*199 end if If z14(0) = arrSuche(0) then wert_a = wert_a+200*200 end if If z15(0) = arrSuche(0) then wert_a = wert_a+201*201 end if If z16(0) = arrSuche(0) then wert_a = wert_a+202*202 end if If z17(0) = arrSuche(0) then wert_a = wert_a+203*203 end if If z18(0) = arrSuche(0) then wert_a = wert_a+204*204 end if MsgBox wert_a

Antwort 1 von gast0

Wie kann man denn bloß so einen *S* schreiben???

Antwort 2 von LUKN-134

naja, das bewerten überlasst mal lieber mir !
aber der fehler....wo ist der !!!!!

bin anfänger

gruß
LUKN-134

Antwort 3 von gast0

Dazu wär´s, für den geneigten Leser erstmal wichtig, zu wissen, welches Ziel erreicht werden soll !
gerne

Antwort 4 von manei

Hallo.

nun ja, wenn Du in Deinem Script die Function "Filter" aufrufst, muß eine Function Filter auch vorhanden sein. Finde diese aber nicht in Deinem Script nicht.

Pack mal die Buchstaben in ein Array, löse dann die Function "Filter".

Bei den If-Abfragen geht das dann über eine Sub auch mit einer Abfrage, da die Werte jedes nächst höheren Buchstabe auch jeweils um 1 höher ist.

Z.B. in einem Array (hier arr) würde a in arr(0) und b In arr(1) usw. stehen. In einer entsprechenden Variablen [var) steht dann also 0 oder 1 oder 2 usw.

wert_a = wert_a+(187+var)*(187+var)

Mit dieser einen Zeile kannst Du dann alle Deine If-Abfragen lösen.

Da ich nicht weiß was Du in Filter machen willst, kann das hier auch nur eine Anleitung für einzelne Abschnite in Deinem Script sein

MfG maneich

Antwort 5 von rfb

zur Ergänzung der Antworten 3 + 4:
  • offensichtlich fehlt ein Teil des Codes (
    Filter
    )
  • aus dem was da ist erschließt sich nicht der Zweck des Skripts
  • was da ist sieht sehr umständlich (und damit natürlich fehleranfällig) gelöst aus

    Um nun effektiv antworten zu können müsstest du erst einmal:
  • den Zweck des Skripts beschreiben
  • den Code komplettieren
  • beschreiben, wie sich der Fehler - den du da vermutest - überhaupt äußert

  • Ich möchte kostenlos eine Frage an die Mitglieder stellen:


    Ähnliche Themen:


    Suche in allen vorhandenen Beiträgen: