SA-MP Forums Archive
YSI compile error. - 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: YSI compile error. (/showthread.php?tid=380589)



YSI compile error. - MrPlatinum - 26.09.2012

Hey all,

It probably isn't all that big of a deal,

but i just added YSI to install somethings for my server, and i try to compile it and i got this error

Код HTML:
C:\Users\Brandon\Desktop\SERVER\pawno\include\YSI\y_iterate.inc(197) : fatal error 111: user error: "Old foreach.inc files are no longer compatible with YSI."
Does this mean i have to update "foreach.inc?

Thanks again guys,


Re: YSI compile error. - Glint - 26.09.2012

Update your foreach although "foreach" isn't needed when you have YSI because y_iterate is already the new version of foreach.


Re: YSI compile error. - MrPlatinum - 26.09.2012

Hey would you be able to link me to a recent foreach?
I did have one put it was in text file and i don't have the slightest clue on how to make it an .inc file.





Re: YSI compile error. - Glint - 26.09.2012

Here http://pastebin.com/Seseuh2x click on download then open it using Notepad or Notepad ++ whatever you are using.

Then click on save as change the file type to All files(.)

and change the name of the file to "foreach.inc"


Re: YSI compile error. - MrPlatinum - 26.09.2012

Alright that worked, i got this error now :S

Код HTML:
C:\Users\Brandon\Desktop\SERVER\pawno\include\YSI\y_svar.inc(67) : fatal error 111: user error: Please define "MODE_NAME" before including y_svar.



Re: YSI compile error. - Glint - 26.09.2012

That is because you included the whole YSI library and y_users too, and y_users needs you to put that before the include however just
pawn Код:
#include <YSI\y_iterate>



Re: YSI compile error. - MrPlatinum - 26.09.2012

Thanks man! it worked,
Also another problem i have come across ><

i added #include <servermoneyGM> to my script and tried to compile it and i got this error,

Код HTML:
C:\Users\Brandon\Desktop\SERVER\pawno\include\YSI/y_hooks.inc(63) : fatal error 111: user error: Did you do <YSI/y_hooks> instead of the required <YSI\y_hooks>?



Re: YSI compile error. - Glint - 26.09.2012

Open "servermoneyGM" then change
pawn Код:
#include <YSI/y_hooks>
to
pawn Код:
#include <YSI\y_hooks>



Re: YSI compile error. - MrPlatinum - 26.09.2012

Worked

But,
Код HTML:
C:\Users\Brandon\Desktop\SERVER\pawno\include\servermoneyGM.inc(62) : error 004: function "OnPlayerHaveExtraCash" is not implemented
C:\Users\Brandon\Desktop\SERVER\pawno\include\servermoneyFS.inc(6) : warning 201: redefinition of constant/macro (symbol "GetPlayerMoney(%1)")
C:\Users\Brandon\Desktop\SERVER\pawno\include\servermoneyFS.inc(7) : warning 201: redefinition of constant/macro (symbol "GivePlayerMoney(%1,%2)")
C:\Users\Brandon\Desktop\SERVER\pawno\include\servermoneyFS.inc(8) : warning 201: redefinition of constant/macro (symbol "ResetPlayerMoney(%1)")



Re: YSI compile error. - XtremeR - 26.09.2012

Quote:
Originally Posted by MrPlatinum
Посмотреть сообщение
Worked

But,
Код HTML:
C:\Users\Brandon\Desktop\SERVER\pawno\include\servermoneyGM.inc(62) : error 004: function "OnPlayerHaveExtraCash" is not implemented
C:\Users\Brandon\Desktop\SERVER\pawno\include\servermoneyFS.inc(6) : warning 201: redefinition of constant/macro (symbol "GetPlayerMoney(%1)")
C:\Users\Brandon\Desktop\SERVER\pawno\include\servermoneyFS.inc(7) : warning 201: redefinition of constant/macro (symbol "GivePlayerMoney(%1,%2)")
C:\Users\Brandon\Desktop\SERVER\pawno\include\servermoneyFS.inc(8) : warning 201: redefinition of constant/macro (symbol "ResetPlayerMoney(%1)")
the warnings are because they are already defined somewhere in your script and you're trying to re-define them and at the top of your script write :
pawn Код:
forward OnPlayerHaveExtraCash(playerid);