Im working on something for my private server...

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

Im working on something for my private server...
  1. Unread #1 - Apr 27, 2008 at 6:42 PM
  2. ViruZ3
    Joined:
    May 21, 2007
    Posts:
    55
    Referrals:
    0
    Sythe Gold:
    0

    ViruZ3 Member

    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
     
  3. Unread #2 - Apr 27, 2008 at 9:47 PM
  4. Merchant_in_the_dark
    Joined:
    Nov 27, 2007
    Posts:
    2,452
    Referrals:
    2
    Sythe Gold:
    0

    Merchant_in_the_dark Grand Master
    Banned

    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.
     
  5. Unread #3 - Apr 28, 2008 at 3:02 AM
  6. Covey
    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    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 >

Users viewing this thread
1 guest


 
 
Adblock breaks this site