SA-MP Forums Archive
Floats and DIALOG_STYLE_INPUT - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Floats and DIALOG_STYLE_INPUT (/showthread.php?tid=394790)



Floats and DIALOG_STYLE_INPUT - 2KY - 24.11.2012

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?


Re: Floats and DIALOG_STYLE_INPUT - iTorran - 24.11.2012

https://sampwiki.blast.hk/wiki/floatstr


Re: Floats and DIALOG_STYLE_INPUT - 2KY - 24.11.2012

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