Shows as 49?
#1

Im testing the year bit of my server,
In the dialog i enter 1990 as a test year,
And it says ok so you were born in 49, why?

pawn Код:
format(string, sizeof(string), "Ok so you were born in %d", inputtext);
            SendClientMessage(playerid, WHITE, string);
Reply
#2

Use %s, not %d.

%d = Decimal (Number)
%s = String (Word)

And inputtext is a string, so..
Reply
#3

Solved.
Reply
#4

Quote:
Originally Posted by WackoX
Use %s, not %d.

%d = Decimal (Number)
%s = String (Word)

And inputtext is a string, so..
But he needs a year and a year is numbers, numbers are integer.
Reply
#5

Quote:
Originally Posted by MenaceX^
Quote:
Originally Posted by WackoX
Use %s, not %d.

%d = Decimal (Number)
%s = String (Word)

And inputtext is a string, so..
But he needs a year and a year is numbers, numbers are integer.
I have with %s and it works. :d
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)