Dini Problem - NameRang Command
#1

Hello guys
I created a namerang Command with ocmd
but now i will save the params with dini
and i get this Error:
error 035: argument type mismatch (argument 3)
This is my Command:

ocmd:namerang(playerid,params[])
{
new aaa,rangid,Rangname[128],fID;
new fz[64];
new str0[128],str1[128];

format(fz,sizeof(fz),"/Fraknamen.txt");
fID = GetPVarInt(playerid,"Fraktion");
if(sscanf(params,"us",rangid,Rangname))return SendClientMessage(playerid,COLOR_RED,"/namerang [RangID] [Neuer Rang-Name]");
else
if(IsPlayerRang(playerid,4))aaa = 1;
if(IsPlayerRang(playerid,5))aaa = 1;
if(aaa != 1) return SendClientMessage(playerid,COLOR_RED,"Du bist kein Fraktion-Leiter");
if(rangid >= 5) return SendClientMessage(playerid,COLOR_RED,"Es gibt nur 5 Rдnge");
else
format(str1,sizeof(str1),"f%ir%i",fID,rangid);
dini_IntSet(fz,str1,Rangname);//Error Line
format(str0,sizeof(str0),"Du hast Rang %i zu %s umbenannt",rangid,Rangname);
SendClientMessage(playerid,COLOR_GREEN,str0);
return 1;
}
Reply
#2

PHP код:
dini_Set(fz,str1,Rangname);//Error Line 
Reply
#3

pawn Код:
dini_Set(fz,"str1",Rangname); // missing '' ''
Reply
#4

Quote:
Originally Posted by View
Посмотреть сообщение
pawn Код:
dini_Set(fz,"str1",Rangname); // missing '' ''
Not really. He formatted str1, so it's correct that way.
Reply
#5

dini_IntSet set only integer, but Rangname is a string variable.
pawn Код:
Rangname[128]
Use this function instead of dini_IntSet
pawn Код:
dini_Set(...)
Reply
#6

Thank you all for help
dini_Set was right not dini_IntSet I'm so stupid ^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)