Dialogs are giving me a hard time tonight
#1

What's the problem with this?

pawn Код:
case DIALOG_HOUSEEDIT + 8: // Editing the house owner
        {
            if( response )
            {
                new
                    plName [ MAX_PLAYER_NAME ];

                GetPlayerName( strval( inputtext), plName, MAX_PLAYER_NAME );
                   
                format( houStats [ plEditingHouse [ playerid ] ] [ HouseOwner ], plName, MAX_PLAYER_NAME );
            }
            else return plEditingHouse [ playerid ] = -1;
        }
It's giving me a tag mismatch on plName on the format.
Reply
#2

pawn Код:
GetPlayerName( plName, plName, MAX_PLAYER_NAME );
Why did you add strval inputtext in here?
Reply
#3

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
pawn Код:
GetPlayerName( plName, plName, MAX_PLAYER_NAME );
Why did you add strval inputtext in here?
strval(inputtext) is the integer form of what the player typed in, which is a playerid. The first parameter in GetPlayerName is the playerid.

Also, 2KY, the parameters for format() are
pawn Код:
format(output[], len, const format[], {Float,_}:...);
Reply
#4

where is the length ?
pawn Код:
format( houStats [ plEditingHouse [ playerid ] ] [ HouseOwner ], plName, MAX_PLAYER_NAME );
format(output[], len, const format[], {Float,_}:...);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)