help a new programmer

Results 1 to 4 of 4
  1. #1
    Newbie taki4ever is offline
    MemberRank
    Apr 2018 Join Date
    2Posts

    Support help a new programmer

    hello
    im new in programing and i need some help
    when i see source of some game i see some code new at me
    like :
    Code:
                WFIFOHEAD(RFIFOW(fd,2),8);
                WFIFOB(RFIFOW(fd, 2), 0) = '\xAA';
                WFIFOB(RFIFOW(fd, 2), 1) = '\x00';
                WFIFOB(RFIFOW(fd, 2), 2) = '\x05';
                WFIFOB(RFIFOW(fd, 2), 3) = '\x02';
                WFIFOB(RFIFOW(fd, 2), 4) = '\x17';
                WFIFOB(RFIFOW(fd, 2), 5) = '\x00';
                WFIFOB(RFIFOW(fd, 2), 6) = '\x00';
                WFIFOB(RFIFOW(fd, 2), 7) = '\x00';
    the xaa and x00 and other code what he means or how he work
    when i see that i filing like a idiot because is new for me
    plz i need some help


  2. #2
    ◝(⁰▿⁰)◜Smile◝ (⁰▿⁰)◜ Taiga is offline
    ModeratorRank
    May 2007 Join Date
    InternetLocation
    2,505Posts

    Re: help a new programmer

    This is a hex value, a value written in hexadecimal.

    the \x seems to escape the hexadecimal value in the language.

    https://en.wikipedia.org/wiki/Hexadecimal


    Moderator & Developer
    I CAN NOT HELP YOU WITH YOUR SERVER, USE THE CORRECT HELP SECTION INSTEAD.
    I AM ONLY TAIGA ON RAGEZONE!


    DO NOT PM ME FOR GAME RELATED QUESTIONS, THESE MESSAGES WILL BE IGNORED!


  3. #3
    Newbie taki4ever is offline
    MemberRank
    Apr 2018 Join Date
    2Posts

    Re: help a new programmer

    Quote Originally Posted by Taiga View Post
    This is a hex value, a value written in hexadecimal.

    the \x seems to escape the hexadecimal value in the language.

    https://en.wikipedia.org/wiki/Hexadecimal
    yeah i know but why use that type why dant use directely the value in Decimal
    like
    int k='5887 ';
    if(k=16ff){
    cout<<"yeah"<<endl;
    }
    why ??

  4. #4
    help a new programmer Future is offline
    SupervisorRank
    Dec 2011 Join Date
    2,239Posts

    Re: help a new programmer

    Quote Originally Posted by taki4ever View Post
    yeah i know but why use that type why dant use directely the value in Decimal
    like

    why ??
    That's impossible to answer with the amount of the source provided. From first sight it doesn't look to be used for string composition.


    Quote Originally Posted by A Wise Man
    P-Servers are NOT dead. Bugs need squishing. Quests need fixing. Unfortunately, majority of people don't know the difference between a computer and a toaster so...



Advertisement