[Tutorial] About Format and Printf
#6

It's lovely to see, how much effort you just gave to re-search for those answers. *sarcastic*

Quote:
Originally Posted by newbie scripter
Посмотреть сообщение
ANSWERS:
1. Cell size means the max number of characters allowed , or like limit.
2. can't understand what you are asking
3. u can use sizeof in OnPlayerText, etc. its purpose is to get the size of the text written
4. % placeholders?? cant understand.
5. %c?
or
5.
pawn Код:
new array[5];
array[0] = 1,
array[1] = 2,
array[2] = 3,
array[3] = 4,
array[4] = 5
  1. Almost correct. A cell can actually store 4 bytes, hence 32 bit. But you just wrote
    Quote:

    [32] and [64] are used to tell the program that the size of the cell is 32bit and 64bit

    which is completly wrong!
  2. My bad, I was asking for the second argument.
    Код:
    GetPlayerName(first argument, second argument, third argument)
    The second argument obviously stores a string. Hint: See SA:MP limits and there is a well know definition used in many scripts.
  3. Not asked that way, neither OnPlayerText() needs sizeof at all.
    I was asking about its syntax and its functionality.
  4. Read the whole format() wiki page, before you copy some of its content.
  5. Neither asked that way. This question refers to
    Quote:
    pawn Код:
    new character = 64;
    printf("I'm %c home",character); //-> result: I'm @ home
    where you did
    pawn Код:
    new character = 64;
    where you just represented a single character as a number.
    Do you think there is a much easier way to represent a single character, by just replacing the number
    pawn Код:
    64
    with something else?
Reply


Messages In This Thread
About Format and Printf - by newbie scripter - 05.11.2013, 12:12
Re: About Format and Printf - by newbie scripter - 06.11.2013, 10:42
Re: About Format and Printf - by CrazyChoco - 06.11.2013, 11:21
AW: About Format and Printf - by BigETI - 06.11.2013, 11:22
Re: About Format and Printf - by newbie scripter - 06.11.2013, 11:30
AW: Re: About Format and Printf - by BigETI - 06.11.2013, 12:52
Re: About Format and Printf - by newbie scripter - 06.11.2013, 13:04
AW: Re: About Format and Printf - by BigETI - 06.11.2013, 13:27
Re: About Format and Printf - by newbie scripter - 06.11.2013, 13:39
AW: About Format and Printf - by BigETI - 06.11.2013, 14:39

Forum Jump:


Users browsing this thread: 1 Guest(s)