SA-MP Forums Archive
y_ini limits? - 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: y_ini limits? (/showthread.php?tid=425832)



y_ini limits? - 2KY - 26.03.2013

pawn Код:
#define MAX_OBJECTS_ON_MAP (10000)

CMD:new ( playerid, params[] )
{
    new
        map_name [ 60 ];

    if( sscanf ( params, "s[60]", map_name ) )
        return SendClientMessage ( playerid, -1, "(Incorrect Usage): /new [map name]" );

    new
        map_string [ 75 ];

    format( map_string, sizeof ( map_string ), "map_%s.2kmap", map_name );

    new
        INI: newMap = INI_Open ( map_string ),
        map_data [ 128 ];

    INI_SetTag ( newMap, "mapdata" );

    for( new o; o < MAX_OBJECTS_ON_MAP; o ++ )
    {
        format( map_data, sizeof ( map_data ), "%d_object_id", o );
        INI_WriteInt ( newMap, map_data, -1 );
    }
    return true;
}
This code will only write 9983 times out of 10,000.

Quote:

9983_object_id = -1

is the last result in the file. Is it user error, or is that the legitimate limit by the include?