Problem Errors
#1

hi... I have problem

Code: Dini
PHP код:
                    if(!dini_Isset(way"V0_pj"))
                    {
                        for(new 
s=0s<5s++)
                        {
                            new 
v_pj[16];
                            
format(v_pj,16,"V%d_pj",s);
                            
dini_IntSet(way,v_pj,9999);
                        }
                    } 


Code: INI
PHP код:
                    if(!INI_WriteInt(UserPath(playerid), "V0_pj"))
                    {
                        for(new 
s=0s<5s++)
                        {
                            new 
v_pj[16];
                            
format(v_pj,16,"V%d_pj",s);
                            
INI_WriteString(UserPath(playerid),v_pj,9999);
                        }
                    } 
Errors: INI
PHP код:
if(!INI_WriteInt(UserPath(playerid), "V0_pj"))  =>  error 035argument type mismatch (argument 1)
INI_WriteString(UserPath(playerid),v_pj,9999); => error 035argument type mismatch (argument 1
I did it from DINI on the YSI
How do I fix it ...? I have it in Login...?
Reply
#2

Help mee guys :/
Reply
#3

https://sampforum.blast.hk/showthread.php?tid=570957
INI Writing
PHP код:
new
    
INI:ini INI_Open("myini.ini");
INI_WriteString(ini"NAME""******");
INI_WriteInt(ini"SCORE"gScore);
INI_WriteFloat(ini"HEALTH"health);
INI_Close(ini); 
so your code gotta be
PHP код:

new
    
INI:ini INI_Open(UserPath(playerid));
for(new 
s=0s<5s++)
{
    new 
v_pj[16];
    
format(v_pj,16,"V%d_pj",s);
    
INI_WriteInt(iniv_pj9999);
}
INI_Close(ini); 
I don't think there's anything like dini_Isset in INI, so you may gotta stick with this function.
Reply
#4

Well I can not overdo this .. it makes me an error :O

PHP код:
                    for(new s=0s<5s++)
                    {
                        new 
V_id[16];
                        
format(V_id16"V%d_id"s);
                        if(
DOF2_GetInt(UserPath(playerid), V_id) > 0)
                        {
                            new 
V_posX[16]; format(V_posX16"V%d_posX"s);
                            new 
V_posY[16]; format(V_posY16"V%d_posY"s);
                            new 
V_posZ[16]; format(V_posZ16"V%d_posZ"s);
                            new 
V_angle[16]; format(V_angle16"V%d_angle"s);
                            new 
V_color1[16]; format(V_color116"V%d_color1"s);
                            new 
V_color2[16]; format(V_color216"V%d_color2"s);
                            new 
V_neons[16]; format(V_neons16"V%d_neons"s);
                            new 
V_spz[16]; format(V_spz16"V%d_spz"s);
                            
PlayerVehicle[s][playerid] = CreateVehicle(DOF2_GetInt(UserPath(playerid), V_id), DOF2_GetFloat(UserPath(playerid), V_posX), DOF2_GetFloat(UserPath(playerid), V_posY), DOF2_GetFloat(UserPath(playerid), V_posZ), DOF2_GetFloat(UserPath(playerid), V_angle), DOF2_GetInt(UserPath(playerid), V_color1), DOF2_GetInt(UserPath(playerid), V_color2), 300);
                            if(
DOF2_SetInt(UserPath(playerid), V_spz))
                            {
                                
SetVehicleNumberPlate(PlayerVehicle[s][playerid], DOF2_GetString(UserPath(playerid), V_spz));
                                
SetVehicleToRespawn(PlayerVehicle[s][playerid]);
                            }
                            if(
DOF2_GetInt(UserPath(playerid), V_neons) > 0)
                            {
                                
PlayerVehicleNeon1[s][playerid] = CreateObject(DOF2_GetInt(UserPath(playerid), V_neons), -0.660.04, -0.48,   0.000.000.00);
                                
PlayerVehicleNeon2[s][playerid] = CreateObject(DOF2_GetInt(UserPath(playerid), V_neons), 0.680.04, -0.48,   0.000.000.00);
                                
AttachObjectToVehicle(PlayerVehicleNeon1[s][playerid], PlayerVehicle[s][playerid], -0.680.04, -0.48,   0.000.000.00);
                                
AttachObjectToVehicle(PlayerVehicleNeon2[s][playerid], PlayerVehicle[s][playerid], 0.680.04, -0.48,   0.000.000.00);
                                
PlayerVehicleNeons[s][playerid] = true;
                            }
                            
PlayerVehicle_State[s][playerid]=true;
                        }
                    } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)