Adblock breaks this site

Im working on something for my private server...

Discussion in 'Programming General' started by ViruZ3, Apr 27, 2008.

  1. ViruZ3

    ViruZ3 Member

    Joined:
    May 21, 2007
    Posts:
    55
    Referrals:
    0
    Sythe Gold:
    0
    Im working on something for my private server...

    Im working on a character file editor. I need to know how to read a line.

    I need to get 99 out character-strength = 99. Same for all the skills. Im also trying to put the 99 that got taken out of the character-strength = 99 into a TextBox. THEN i need a button to save the changes but i need some help to create that also.

    Can anyone help me please! :D
     
  2. Merchant_in_the_dark

    Merchant_in_the_dark Grand Master
    Banned

    Joined:
    Nov 27, 2007
    Posts:
    2,452
    Referrals:
    2
    Sythe Gold:
    0
    Im working on something for my private server...

    Try using a string tokenizer to read the 99 from the data, and then save it to a seperate variable. Look it up in the class libraries if you don't know how to do it.
     
  3. Covey

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816
    Im working on something for my private server...

    Code:
    private function GetStatFromString(strLine as string) as integer
        dim sTemp as long
        dim sLen as long
        stemp = instr(1,strline," = ") + 3
        slen = len(strline) - stemp
        getstatfromstring = cint(val(mid(strline,stemp,slen)))
    end function
    How to use:
    Code:
    msgbox getstatfromstring("character-strength = 99")
    you could also use a simpler method of:
    Code:
    private function GetStatFromString(strLine as string) as integer
        getstatfromstring = cint(val(right(strline,3)))
    end function
     
< Flash Circle TD trainer | hard question... help is appreciated >


 
 
Adblock breaks this site