ZCMD & STRCAT: Why this code don't work?
#4

Load crashdetect plugin and compile with -d3 flag (https://github.com/Zeex/samp-plugin-...ith-debug-info) because I'm pretty sure a run time error 4 is what causes your problem and more specific, this function: GetVehicleName.

You can prevent it for now using this:
PHP код:
CMD:vmenu(playeridparams[])
{
    new 
finale[150], id[3];
    
    
id[0] = PlayerInfo[playerid][IDVeicolo],
    
id[1] = PlayerInfo[playerid][IDVeicolo2],
    
id[2] = PlayerInfo[playerid][IDVeicolo3];
    
    for (new 
i!= sizeof (id); ++i)
    {
        if (!
id[i] || !GetVehicleModel(id[i])) strcat(finale"Slot libero\n"sizeof (finale));
        else 
format(finalesizeof(finale), "%s - (FC 0%d LV)\n"GetVehicleName(id[i]), id[i]);
    }
    
    
ShowPlayerDialog(playeridDIALOG_VMENUDIALOG_STYLE_LIST"Menщ veicolo"finale"Seleziona""Esci");
    return 
1;

but fixing the function is recommended so it won't happen in other places as well.
Reply


Messages In This Thread
ZCMD & STRCAT: Why this code don't work? - by DarkLouis - 09.06.2015, 13:02
Re: ZCMD & STRCAT: Why this code don't work? - by Ritzy2K - 09.06.2015, 13:04
Re: ZCMD & STRCAT: Why this code don't work? - by DarkLouis - 09.06.2015, 13:06
Re: ZCMD & STRCAT: Why this code don't work? - by Konstantinos - 09.06.2015, 13:26
Re: ZCMD & STRCAT: Why this code don't work? - by DarkLouis - 09.06.2015, 13:32

Forum Jump:


Users browsing this thread: 1 Guest(s)