Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 23:18

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[?] Function Problem

Discussion on [?] Function Problem within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1

 
elite*gold: 157
The Black Market: 150/0/0
Join Date: Feb 2011
Posts: 1,669
Received Thanks: 127
[?] Function Problem

Heyho liebe Epvp Community,

habe hier ein kleines Problem mit meiner cvn-Pattern Function.
PHP Code:
    Function cvnGenerate(ByVal Muster As String)
        
Dim Ausgabe As String vbEmpty
        Muster 
Muster.ToArray
        Dim Vokale 
As String "aeiou"
        
Dim Konso As String "bcdfghjklmnpqrstvwxyz"
        
Vokale Vokale.ToArray
        Konso 
Konso.ToArray
        Dim rndnb 
As New Integer
        Dim rnd 
As New Random
        
For 0 To Muster.Length 1
            Dim AktuellerChar 
As String Muster(i).ToString
            
If AktuellerChar "c" Then
                rndnb 
rnd.Next(0Konso.Length)
                
Ausgabe &= Konso(rndnb).ToString
            
ElseIf AktuellerChar "v" Then
                rndnb 
rnd.Next(0Vokale.Length)
                
Ausgabe &= Vokale(rndnb).ToString
            
ElseIf AktuellerChar "n" Then
                Ausgabe 
&= rnd.Next(010)
            
End If
        
Next
        
Return Ausgabe
    End 
Function 
Die Funktion allein an sich funktioniert ja.
Aber wenn ich sie in eine For Schlaufe setze und sie sich immer wieder wiederholt, spuckt sie mir jedesmal das selbe Ergebniss auf obwohl ich ein Random Ergebniss haben will.

Kann mir da jemand helfen?

lg
JaneAusten is offline  
Old 10/26/2012, 19:03   #2
 
elite*gold: 0
Join Date: Sep 2012
Posts: 28
Received Thanks: 2
PHP Code:
    Private rnd As New Random

    
Function cvnGenerate(ByVal Muster As String)
        
Dim Ausgabe As String vbEmpty
        Muster 
Muster.ToArray
        Dim Vokale 
As String "aeiou"
        
Dim Konso As String "bcdfghjklmnpqrstvwxyz"
        
Vokale Vokale.ToArray
        Konso 
Konso.ToArray
        Dim rndnb 
As New Integer

        
For 0 To Muster.Length 1
            Dim AktuellerChar 
As String Muster(i).ToString
            
If AktuellerChar "c" Then
                rndnb 
rnd.Next(0Konso.Length)
                
Ausgabe &= Konso(rndnb).ToString
            
ElseIf AktuellerChar "v" Then
                rndnb 
rnd.Next(0Vokale.Length)
                
Ausgabe &= Vokale(rndnb).ToString
            
ElseIf AktuellerChar "n" Then
                Ausgabe 
&= rnd.Next(010)
            
End If
        
Next
        
Return Ausgabe
    End 
Function 
ThisIsATestAccount is offline  
Reply


Similar Threads Similar Threads
[PHP] Problem - Warning: session_start() [function.session-start]
05/06/2012 - Web Development - 8 Replies
Hallo ich möchte ein polnisches Script ins deutsche übersetzen damit ich ein Projekt weiterführen kann, allerdings ergibt sich das ziemlich schwer, egal bei welcher PHP Datei ich den Text veränder tritt dieser Fehler auf: "Warning: session_start() : Cannot send session cache limiter - headers already sent (output started at /users/test/www/poczekalnia.php:1) in /users/test/www/poczekalnia.php on line 21" Hier zum Beispiel ist es: "Brak obiektów do wyświetlenia" Änder ich es in: "Es gibt...
there is a problem in the function of anti hacking.the programm is closing
11/14/2010 - Kal Online - 13 Replies
hey irgendwie kommt auf dem pc von meinem bro(seit heute mittag) immer dieses "there is a problem in the function of anti hacking.the programm is closing" wenn er kal startet(int kal,kein pserver) falls einer ne idee hat mal bescheid sagen :D danke :D
[C++]Hook all Recv function Problem
08/21/2010 - C/C++ - 5 Replies
Hi Leute wenn ich send hooke egal welches läuft das alles super nur wenn ich irgendein recv hooke habe ich immer eine Packet size von 1000 bis 10000. sry das ich schon wieder nerve #include "WinSock2.h" #include <cstdio> #include <ctime> #include <fstream> #include <iomanip>
problem in the function of anti hacking
03/30/2010 - Kal Online - 8 Replies
also ich hab das problem das immer mein kal abkack wenn ich es starten will mit dieser meldung ... was kann es sein ???!! hab schon unter prozesse geguckt -.- aber nix gefunden danke im vorraus
PROBLEM Agbot & Loop function
01/28/2009 - Silkroad Online - 6 Replies
ok i have this problem i make a script whit Agdev , i name it default i do everything need for Agbot but when i start Sro, on Agbot the button of "Start Walkscript" looks like when u click it and my char just walk to one to other point doing nothing and the button get normal and thats it! then the "Start Bot" button gets clicked and my char start goint to the shout and hits a wall u____u i dont know what im doing wrong but i can make the loop function work :/ extra information: im...



All times are GMT +2. The time now is 23:18.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.