SA-MP Forums Archive
2 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: 2 Errors (/showthread.php?tid=662192)



2 Errors - mmlinaric - 25.12.2018

Code:
Код HTML:
    ///////////////////////////////////////////////////////////////////////////////////
    new bankaba[128];
    format(bankaba, sizeof(bankaba),"$%d",PlayerInfo[playerid][pNovacBanka]);
    PlayerTextDrawSetString(playerid,IgracevInfo[11], zlatoba);
    ///////////////////////////////////////////////////////////////////////////////
    new zlatoba[128];
    format(zlatoba, sizeof(zlatoba),"%d g",PlayerInfo[playerid][pZlato]);
    PlayerTextDrawSetString(playerid,IgracevInfo[14], zlatoba);
    //////////////////////////////////////////////////////////////////////////////
Error:
Код HTML:
C:\Users\Test\Desktop\Grand School RolePlay\gamemodes\gs-rp.pwn(17839) : error 035: argument type mismatch (argument 2)
C:\Users\Test\Desktop\Grand School RolePlay\gamemodes\gs-rp.pwn(17843) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
P.S. Code is under "OnPlayerUpdate"!
Thank you!


Re: 2 Errors - mmlinaric - 25.12.2018

Quote:
Originally Posted by ******
Посмотреть сообщение
We don't know which lines those are. Of course, the bigger concern with your script is why do you have over 17,000 lines in a single file? Split it up!
Hey, I just want to fix those errors. Not to split the script.
But, how do you think I shoud "split" the script?


Re: 2 Errors - mmlinaric - 25.12.2018

And errors are where are "PlayerTextDrawSetString".


Re: 2 Errors - Undef1ned - 25.12.2018

From what I see "IgracevInfo" is a global text drawing and it is necessary that it be a text player to be used in that way.

It must be like this:

PHP код:
new PlayerText:IgracevInfo[MAX_PLAYERS][14]; //14 is the maximum amount of textdraws created 
And it would look like this:

PHP код:
new zlatoba[90];
format(zlatobasizeof(zlatoba),"%d g",PlayerInfo[playerid][pZlato]);
PlayerTextDrawSetString(playeridIgracevInfo[playerid][14], zlatoba); 



Re: 2 Errors - mmlinaric - 26.12.2018

Quote:
Originally Posted by Undef1ned
Посмотреть сообщение
From what I see "IgracevInfo" is a global text drawing and it is necessary that it be a text player to be used in that way.

It must be like this:

PHP код:
new PlayerText:IgracevInfo[MAX_PLAYERS][14]; //14 is the maximum amount of textdraws created 
And it would look like this:

PHP код:
new zlatoba[90];
format(zlatobasizeof(zlatoba),"%d g",PlayerInfo[playerid][pZlato]);
PlayerTextDrawSetString(playeridIgracevInfo[playerid][14], zlatoba); 
OH MY GOD! Thank you sooooo much for this!!!!!!!!!