TextDraw formatting problem with DoF2 - 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: TextDraw formatting problem with DoF2 (
/showthread.php?tid=400229)
TextDraw formatting problem with DoF2 -
PDChaseOfficial - 17.12.2012
Hey guys,
Im using Double o' Files 2 for my account system. Whenever I want to access a persons saved variable, I do something like
Код:
PlayerInfo[playerid][pSomething]
It works perfectly but with my textdraw code, I am trying to make textdraws show couple of stats for player. Here's my code.
Код:
new textstring[50];
format(textstring,sizeof(textstring),"%i",kills[i]);
PlayerTextDrawSetString(i,currentkillsammount[i],textstring);
format(textstring,sizeof(textstring),"%i",deaths[i]);
PlayerTextDrawSetString(i,currentdeathsammount[i],textstring);
format(textstring,sizeof(textstring),"%i",PlayerInfo[i][pKills]);
PlayerTextDrawSetString(i,allkillsammount,textstring);
format(textstring,sizeof(textstring),"%i",PlayerInfo[i][pDeaths]);
PlayerTextDrawSetString(i,alldeathsammount,textstring);
format(textstring,sizeof(textstring),"%i",PlayerInfo[i][pEscapes]);
PlayerTextDrawSetString(i,timesevadedammount,textstring);
PlayerTextDrawShow(i,currentkillsammount[i]);
PlayerTextDrawShow(i,currentdeathsammount[i]);
PlayerTextDrawShow(i,allkillsammount[i]);
PlayerTextDrawShow(i,alldeathsammount[i]);
PlayerTextDrawShow(i,timesevadedammount[i]);
It gives me 3 errors. Exactly on these lines.
Код:
format(textstring,sizeof(textstring),"%i",PlayerInfo[i][pKills]);
format(textstring,sizeof(textstring),"%i",PlayerInfo[i][pDeaths]);
format(textstring,sizeof(textstring),"%i",PlayerInfo[i][pEscapes]);
The other string formatings above them give no errors. Thats why I believe its problem with DoF2.
I got my PlayerTexts declared and specified. There's no problem with those.
Error message:
Код:
error 035: argument type mismatch (argument 2)
Thanks in advance.
Re: TextDraw formatting problem with DoF2 -
PDChaseOfficial - 17.12.2012
Sorry, I quite don't understand your question. Are you asking me what errors do I get? They are:
Код:
error 035: argument type mismatch (argument 2)
These errors pop up for the 3 lines mentioned above.
Re: TextDraw formatting problem with DoF2 -
PDChaseOfficial - 17.12.2012
Problem resolved. Thanks for attempt anyways.