Floats and DIALOG_STYLE_INPUT
#1

pawn Код:
case DIALOG_ENTRANCES_EDIT_IPOS_X:
        {
            if( response )
            {
                EntranceInfo [ plEditingEntrance [ playerid ] ] [ iX ] = strval( inputtext ); // Specifically this.
                SaveEntrance( plEditingEntrance [ playerid ] );
                LoadEntrance( plEditingEntrance [ playerid ] );
               
                new
                    cStr [ 32 ],
                    iStr [ 128 ];

                format( cStr, 32, "Editing: Entrance #%d", plEditingEntrance [ playerid ] );
                format( iStr, 128, ""#I_RoyalBlue"Current Teleport Y: "#I_White"%f\n\nTeleport Y is where the player will be teleported to when entering the Entry Point.", EntranceInfo [ plEditingEntrance[ playerid ] ] [ iY ] );
                ShowPlayerDialog( playerid, DIALOG_ENTRANCES_EDIT_IPOS_Y, DIALOG_STYLE_INPUT, cStr, iStr, "Change", "Back" );
                printf("%f", strval( inputtext ) );
            }
            else return ShowDialog( playerid, DIALOG_ENTRANCES_EDIT );
        }
It prints "NaN", how can I do this a different way?
Reply
#2

https://sampwiki.blast.hk/wiki/floatstr
Reply
#3

Quote:
Originally Posted by iTorran
Посмотреть сообщение
Didn't do my research, clearly. Thank you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)