Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Evolved Modder
    Living Liek Larry
    tony's Avatar
    Join Date
    May 2011
    Location
    Listen, strange women lyin' in ponds distributin' swords is no basis for a system of government.
    Posts
    6,302
    Points
    10,689
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Listen, strange women lyin' in ponds distributin' swords is no basis for a system of government.
    Posts
    6,302
    Points
    10,689
    Gamer IDs

    PSN ID: L33T_T0ny Steam ID: ToNy Wii Code: L33T_T0ny

    Default strtok tutorial( for morder )

    The strtok() function splits a string into smaller strings, that are called on by arrays

    this can be useful in many situations, as an example nity ( xgrapidz) mod menu uses the strtok command frequently to add options

    when using strtok() it is set up like this

    name = strtok( string, parameter );

    before i can explain string i have to explain parameter, parameter is a symbol or value that will separate the many pieces of the string as a example i will be using | as the parameter

    name = strtok( string, "|" );

    now to fill in the string, the string is a set of text with multiple options or words that are separated by your parameter, as a example i will use weapon names as my string

    name = strtok( "hatchet_mp | frag_mp | knife_mp", "|" );

    this will now become

    name[0] = hatchet_mp
    name[1] = frag_mp
    name[2] = knife_mp


    this is called an array, name currently has a array of 2, and name.size will equal 3



    Sent from my Transformer TF101 using Tapatalk 2

    0 Not allowed! Not allowed!

  2. #2
    Banned
    Join Date
    May 2011
    Posts
    917
    Points
    1,182
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Posts
    917
    Points
    1,182

    Default

    Quote Originally Posted by tony View Post
    The strtok() function splits a string into smaller strings, that are called on by arrays

    this can be useful in many situations, as an example nity ( xgrapidz) mod menu uses the strtok command frequently to add options

    when using strtok() it is set up like this

    name = strtok( string, parameter );

    before i can explain string i have to explain parameter, parameter is a symbol or value that will separate the many pieces of the string as a example i will be using | as the parameter

    name = strtok( string, "|" );

    now to fill in the string, the string is a set of text with multiple options or words that are separated by your parameter, as a example i will use weapon names as my string

    name = strtok( "hatchet_mp | frag_mp | knife_mp", "|" );

    this will now become

    name[0] = hatchet_mp
    name[1] = frag_mp
    name[2] = knife_mp


    this is called an array, name currently has a array of 2, and name.size will equal 3



    Sent from my Transformer TF101 using Tapatalk 2

    helped a lot!

    0 Not allowed! Not allowed!

  3. #3
    Evolved Modder
    Living Liek Larry
    tony's Avatar
    Join Date
    May 2011
    Location
    Listen, strange women lyin' in ponds distributin' swords is no basis for a system of government.
    Posts
    6,302
    Points
    10,689
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Listen, strange women lyin' in ponds distributin' swords is no basis for a system of government.
    Posts
    6,302
    Points
    10,689
    Gamer IDs

    PSN ID: L33T_T0ny Steam ID: ToNy Wii Code: L33T_T0ny

    Default Re: strtok tutorial( for morder )

    you welcome, if you have any questions about any othe functions im willing to help

    Sent from my Transformer TF101 using Tapatalk 2

    0 Not allowed! Not allowed!

  4. #4
    Banned
    Join Date
    May 2011
    Posts
    917
    Points
    1,182
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Posts
    917
    Points
    1,182

    Default

    Quote Originally Posted by tony View Post
    you welcome, if you have any questions about any othe functions im willing to help

    Sent from my Transformer TF101 using Tapatalk 2
    That's about it, I know almost everything else.

    0 Not allowed! Not allowed!

  5. #5
    Evolved Modder
    Living Liek Larry
    tony's Avatar
    Join Date
    May 2011
    Location
    Listen, strange women lyin' in ponds distributin' swords is no basis for a system of government.
    Posts
    6,302
    Points
    10,689
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Listen, strange women lyin' in ponds distributin' swords is no basis for a system of government.
    Posts
    6,302
    Points
    10,689
    Gamer IDs

    PSN ID: L33T_T0ny Steam ID: ToNy Wii Code: L33T_T0ny

    Default Re: strtok tutorial( for morder )

    Quote Originally Posted by MorderVonJuden View Post
    That's about it, I know almost everything else.
    orly, how about toltok?

    Sent from my Transformer TF101 using Tapatalk 2

    0 Not allowed! Not allowed!

  6. #6
    Banned
    Join Date
    May 2011
    Posts
    917
    Points
    1,182
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Posts
    917
    Points
    1,182

    Default

    Quote Originally Posted by tony View Post
    orly, how about toltok?

    Sent from my Transformer TF101 using Tapatalk 2
    Your pulling my chain.

    0 Not allowed! Not allowed!

  7. #7
    http://xat.com/cleaker
    Dv0id's Avatar
    Join Date
    Aug 2012
    Location
    Taking a shit... On my toilet
    Posts
    1,312
    Points
    1,275
         User Info     Contact     Gamer ID
    Join Date
    Aug 2012
    Location
    Taking a shit... On my toilet
    Posts
    1,312
    Points
    1,275
    Gamer IDs

    Wii Code: 3213-373-1827

    Default

    Thank you Tony, As it helped morder. it had also helped me.

    0 Not allowed! Not allowed!
    #SOTW Second place
    More sigs here


    1. Clash Of Clans Hack *Working as of 10-3-14*
    2. To lazy to go to homepage? Click >HERE<

  8. #8
    Evolved Modder
    Living Liek Larry
    tony's Avatar
    Join Date
    May 2011
    Location
    Listen, strange women lyin' in ponds distributin' swords is no basis for a system of government.
    Posts
    6,302
    Points
    10,689
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Listen, strange women lyin' in ponds distributin' swords is no basis for a system of government.
    Posts
    6,302
    Points
    10,689
    Gamer IDs

    PSN ID: L33T_T0ny Steam ID: ToNy Wii Code: L33T_T0ny

    Default Re: strtok tutorial( for morder )

    lol nope tolok is a function that makes a text string all lowercase

    ik hundreds of others too never assume you know everything.


    Sent from my Transformer TF101 using Tapatalk 2

    0 Not allowed! Not allowed!
    Last edited by tony; 09-17-2012 at 02:50 PM.

  9. #9
    Banned
    Join Date
    May 2011
    Posts
    917
    Points
    1,182
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Posts
    917
    Points
    1,182

    Default

    Quote Originally Posted by tony View Post
    lol nope tolok is a function that makes a text string all lowercase

    ik hundreds of others too never assume you know everything.


    Sent from my Transformer TF101 using Tapatalk 2
    I actually am compiling a list that I released. Do you know acos?

    0 Not allowed! Not allowed!

  10. #10
    Evolved Modder
    Living Liek Larry
    tony's Avatar
    Join Date
    May 2011
    Location
    Listen, strange women lyin' in ponds distributin' swords is no basis for a system of government.
    Posts
    6,302
    Points
    10,689
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Listen, strange women lyin' in ponds distributin' swords is no basis for a system of government.
    Posts
    6,302
    Points
    10,689
    Gamer IDs

    PSN ID: L33T_T0ny Steam ID: ToNy Wii Code: L33T_T0ny

    Default

    yep, it returns an angle corresponding to a particular cosine value

    you would find the cosine value by using the cos function to convert a angle

    cosine = Cos(0,0,90 );
    imsmarterthanyou = ACos( cosine );

    keep trying,

    0 Not allowed! Not allowed!

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -10. The time now is 04:43 PM.
Powered by vBulletin®
Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.