YSI doesn't like my GM
#1

Yo guys,

I've been trying to add YSI/y_iterate to my GM and it just doesn't want to cooperate.

My GM has a few other incudes and wherever I put YSI it gives random errors.

Here are the includes:

Код:
#include <a_samp>
#include <YSI\y_iterate>
#include <a_players>
#include <streamer>
#include <fixes>
#include <vehcolor>
//#include <core>
#include <float>
#include <zcmd>
#include <Dini2>
#include <sscanf2>
#include <OnPlayerUseVending>
#include <fly>
#include <mapandreas>
#include <profiler>
#include <MyNatives>
#include <strlib>
And current error:

Код:
F:\Games\Samp server\pawno\include\fixes.inc(3282) : fatal error 111: user error: _ALS_OnFilterScriptInit defined
If I put it on the bottom of the includes, after compiling, this happens:

Код:
F:\Games\Samp server\pawno\include\Dini2.inc(200) : warning 219: local variable "NULL" shadows a variable at a preceding level
F:\Games\Samp server\pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\y_utils.inc(430) : warning 201: redefinition of constant/macro (symbol "isnull(%1)")
F:\Games\Samp server\pawno\include\YSI\..\YSI_Data\..\YSI_Coding\y_hooks/impl.inc(1128) : warning 235: public function lacks forward declaration (symbol "VA_OnScriptInit")
F:\Games\Samp server\pawno\include\YSI\..\YSI_Data\y_foreach/iterators.inc(604) : warning 201: redefinition of constant/macro (symbol "CreateVehicle")
F:\Games\Samp server\pawno\include\YSI\..\YSI_Data\y_foreach/iterators.inc(622) : warning 201: redefinition of constant/macro (symbol "AddStaticVehicle")
F:\Games\Samp server\pawno\include\YSI\..\YSI_Data\y_foreach/iterators.inc(646) : warning 201: redefinition of constant/macro (symbol "AddStaticVehicleEx")
F:\Games\Samp server\pawno\include\YSI\..\YSI_Data\y_foreach/iterators.inc(662) : warning 201: redefinition of constant/macro (symbol "DestroyVehicle")
F:\Games\Samp server\gamemodes\BalkanKingRP.pwn(116) : error 017: undefined symbol "do_not_use_tabsize_0"
I can't find anything about this and it's quite frustrating, so if someone can help me I would appreciate it a lot.

Thanks in advanced.

EDIT:

I tried including the foreach standalone version and it gives me the same errors.

2nd EDIT:

I think I found the problem, my include vehcolors screws with it for some reason and after I removed the vehcolor include following errors happen:

Код:
F:\Games\Samp server\pawno\include\Dini2.inc(200) : warning 219: local variable "NULL" shadows a variable at a preceding level
F:\Games\Samp server\pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\y_utils.inc(430) : warning 201: redefinition of constant/macro (symbol "isnull(%1)")
F:\Games\Samp server\pawno\include\YSI\..\YSI_Data\..\YSI_Coding\y_hooks/impl.inc(1128) : warning 235: public function lacks forward declaration (symbol "VA_OnScriptInit")
3rd EDIT:

Guys I fixed it by removing all other YSI includes from my pawno/include folder.
So now I'm just using the foreach include and it's working.
Buy the thing that bothers me is, why the heck does it give me so many errors if I try include YSI?

NOTE: I'm gonna leave this thread here if someone needs help with it.
Reply
#2

What YSI version you use?
Reply
#3

The latest one I guess?
Reply
#4

#include <fixes> just after a_samp.
Reply
#5

Yeah did that and it still gives me same warnings(they are not errors btw, my bad).

It works buy still gives me those weird warnings for vehcolor and Dini2 includes.

EDIT: ****** thx for responding, I'm gonna try to fix those warnings(As i said the only ones remaining are vehcolor and Dini2) and I'll try to switch to y_ini.

Quote:
Originally Posted by ******
Посмотреть сообщение
The ones I just told you how to fix?
As I was writing this you responded so I didn't see the explanation.
Reply
#6

I removed the vehcolor include from my script and made my own function for GetVehicleColor.

The only warning remaining is one from Dini2 buy I will switch to y_ini in closer future.

Thanks for help guys rep+!

EDIT:

******, can you explain me how to loop through MAX_HOUSES for ex. because I can't find a detailed tutorial about the foreach function. I tried making a new Iterator but it doesn't work for some reason and it says YSI symbol is never used Houses?

Here's my code:
Код:
new Iterator: Houses<MAX_HOUSES>;
foreach (new h : Houses)
And here's the warning:

Код:
F:\Games\Samp server\gamemodes\BalkanKingRP.pwn(26569) : warning 203: symbol is never used: "Iter_Single@Houses"
Reply
#7

Remove the space:
PHP код:
new Iterator:Houses<MAX_HOUSES>; 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)