SA-MP Forums Archive
annoying errors !!!!!!!!!!!! - 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: annoying errors !!!!!!!!!!!! (/showthread.php?tid=585067)



annoying errors !!!!!!!!!!!! - noamch1997 - 10.08.2015

C:\asd\ъйчйд згщд - теъч\gamemodes\MCDM2.pwn(13962) : error 035: argument type mismatch (argument 3)
C:\asd\ъйчйд згщд - теъч\gamemodes\MCDM2.pwn(13963) : error 035: argument type mismatch (argument 3)

PHP код:
new cname[256], idcar[256], have[256];
    
cname dini_Get(GetPlayerRLFile(playerid),"CarName");
    
idcar dini_Get(GetPlayerRLFile(playerid),"CarID");
    
have dini_Get(GetPlayerRLFile(playerid),"HaveCar");
    
dini_Remove(GetPlayerRLFile(playerid));
    
dini_Create(GetPlayerRLFile2(playerid));
    
dini_Set(GetPlayerRLFile(playerid),"Name",IsAskForNick[Player]);
     
dini_IntSet(GetPlayerRLFile(playerid),"HaveCar",have); <-----------shit #1 (13962)
     
dini_IntSet(GetPlayerRLFile(playerid),"CarID",idcar); <-----------shit #2 (13963)
     
dini_Set(GetPlayerRLFile(playerid),"CarName",cname); 



Re: annoying errors !!!!!!!!!!!! - Andre02 - 10.08.2015

try this:

PHP код:
    new cname[256], idcar[256], have[256]; 
    
cname dini_Get(GetPlayerRLFile(playerid),"CarName"); 
    
idcar dini_Get(GetPlayerRLFile(playerid),"CarID"); 
    
have dini_Get(GetPlayerRLFile(playerid),"HaveCar"); 
    
dini_Remove(GetPlayerRLFile(playerid)); 
    
dini_Create(GetPlayerRLFile2(playerid)); 
    
dini_Set(GetPlayerRLFile(playerid),"Name",IsAskForNick[Player]); 
    
dini_IntSet(GetPlayerRLFile(playerid),"HaveCar",strval(have));
    
dini_IntSet(GetPlayerRLFile(playerid),"CarID",strval(idcar));
    
dini_Set(GetPlayerRLFile(playerid),"CarName",cname); 
Not Tested


Re: annoying errors !!!!!!!!!!!! - valych - 10.08.2015

have and idcar are arrays and in function dini_IntSet the 3rd argument should be an integer value.
I guess this will help you to get rid of your "annoying errors":
PHP код:
new cname[256], idcar[256], have[256]; 
    
cname dini_Get(GetPlayerRLFile(playerid),"CarName"); 
    
idcar dini_Get(GetPlayerRLFile(playerid),"CarID"); 
    
have dini_Get(GetPlayerRLFile(playerid),"HaveCar"); 
    
dini_Remove(GetPlayerRLFile(playerid)); 
    
dini_Create(GetPlayerRLFile2(playerid)); 
    
dini_Set(GetPlayerRLFile(playerid),"Name",IsAskForNick[Player]); 
     
dini_IntSet(GetPlayerRLFile(playerid),"HaveCar",strval(have)); // <-----------shit #1 
     
dini_IntSet(GetPlayerRLFile(playerid),"CarID",strval(idcar)); // <-----------shit #2 
     
dini_Set(GetPlayerRLFile(playerid),"CarName",cname); 



Re: annoying errors !!!!!!!!!!!! - noamch1997 - 11.08.2015

Quote:
Originally Posted by Andre02
Посмотреть сообщение
try this:

PHP код:
    new cname[256], idcar[256], have[256]; 
    
cname dini_Get(GetPlayerRLFile(playerid),"CarName"); 
    
idcar dini_Get(GetPlayerRLFile(playerid),"CarID"); 
    
have dini_Get(GetPlayerRLFile(playerid),"HaveCar"); 
    
dini_Remove(GetPlayerRLFile(playerid)); 
    
dini_Create(GetPlayerRLFile2(playerid)); 
    
dini_Set(GetPlayerRLFile(playerid),"Name",IsAskForNick[Player]); 
    
dini_IntSet(GetPlayerRLFile(playerid),"HaveCar",strval(have));
    
dini_IntSet(GetPlayerRLFile(playerid),"CarID",strval(idcar));
    
dini_Set(GetPlayerRLFile(playerid),"CarName",cname); 
Not Tested
tnx bro !!! works perfect
Quote:
Originally Posted by valych
Посмотреть сообщение
have and idcar are arrays and in function dini_IntSet the 3rd argument should be an integer value.
I guess this will help you to get rid of your "annoying errors":
PHP код:
new cname[256], idcar[256], have[256]; 
    
cname dini_Get(GetPlayerRLFile(playerid),"CarName"); 
    
idcar dini_Get(GetPlayerRLFile(playerid),"CarID"); 
    
have dini_Get(GetPlayerRLFile(playerid),"HaveCar"); 
    
dini_Remove(GetPlayerRLFile(playerid)); 
    
dini_Create(GetPlayerRLFile2(playerid)); 
    
dini_Set(GetPlayerRLFile(playerid),"Name",IsAskForNick[Player]); 
     
dini_IntSet(GetPlayerRLFile(playerid),"HaveCar",strval(have)); // <-----------shit #1 
     
dini_IntSet(GetPlayerRLFile(playerid),"CarID",strval(idcar)); // <-----------shit #2 
     
dini_Set(GetPlayerRLFile(playerid),"CarName",cname); 
bro ! your explain was exellent ! tnx !!!! =]