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



2 Errors because YSI? - Blackazur - 09.11.2013

Heyho, i have this problem for a long time but how to fix it? I have the new YSI Version.

Код:
warning 201: redefinition of constant/macro (symbol "strcpy(%0,%1)")
warning 203: symbol is never used: "strtok"



Re: 2 Errors because YSI? - Konstantinos - 09.11.2013

Remove the strcpy from your script, it's already defined in YSI.
And add the keyword stock before strtok to get rid of the warning.


AW: 2 Errors because YSI? - Blackazur - 09.11.2013

Where i can find strcpy in my script when i type it in the search console it dont appear, lol


Re: 2 Errors because YSI? - iZN - 09.11.2013

It must be there or undefine it.

pawn Код:
#undef strcpy



Re: 2 Errors because YSI? - Konstantinos - 09.11.2013

From where that warning was given? File name?


AW: 2 Errors because YSI? - Blackazur - 09.11.2013

Because that:

Код:
#include <YSI\y_va>
But when i change it to:

Код:
#include <y_va>
This warning come:

Код:
cannot read from file: "y_utils"



Re: 2 Errors because YSI? - Konstantinos - 09.11.2013

No, it should be YSI\y_va

I meant the warning was given by what file? Not, what you added and it appeared. Before this "warning 201: redefinition of constant/macro (symbol "strcpy(%0,%1)")" says the file and the line, so which file and line was?


AW: 2 Errors because YSI? - Blackazur - 09.11.2013

that is the line of a createdynamicobject for the map(s). i dont know why this error come.


Re: 2 Errors because YSI? - Kaperstone - 09.11.2013

A simple & quick fix if you desire to compile it only.
pawn Код:
#if !defined strcpy
           #define strcpy(%0, %1, %2) strcat(%0, %1, %2)
#endif
#pragma unused strtok
Should do the trick.


AW: 2 Errors because YSI? - Blackazur - 09.11.2013

thanks 1 Error is away but now i have still this one:

Код:
redefinition of constant/macro (symbol "strcpy(%0,%1)")