include that causes warning -
ivndosos - 19.01.2018
when i added this
#include <YSI\y_ini>
i got these errors which do not really relate to the code
Код:
C:\Users\yan\Desktop\SA-MP Server\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\y_utils.inc(430) : warning 201: redefinition of constant/macro (symbol "isnull(%1)")
C:\Users\yan\Desktop\SA-MP Server\gamemodes\DBv1.pwn(185) : warning 219: local variable "Random" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Warnings.
line 185
Код:
new Random = random(sizeof(RandomSpawns));
Re: include that causes warning -
jasperschellekens - 19.01.2018
Update your incs. Redownload all YSI includes
Re: include that causes warning -
ivndosos - 19.01.2018
It is updated.
Re: include that causes warning -
jasperschellekens - 19.01.2018
Quote:
Originally Posted by ivndosos
It is updated.
|
Clearly it isn't otherwise it wouldnt give you warnings. Just re install all the includes.
Also if you don't want to reinstall. those are basic errors which are easy to fix.
And your error with this line:
PHP код:
new Random = random(sizeof(RandomSpawns));
Is simply caused because you use random globally in your script elsewhere.
Try to make it RandonSpawnsArray or something:
PHP код:
new RandomSpawnsSomething = randomSpawnsSomething(sizeof(RandomSpawns));
Re: include that causes warning -
RogueDrifter - 19.01.2018
Quote:
Originally Posted by jasperschellekens
Clearly it isn't otherwise it wouldnt give you warnings. Just re install all the includes.
Also if you don't want to reinstall. those are basic errors which are easy to fix.
And your error with this line:
PHP код:
new Random = random(sizeof(RandomSpawns));
Is simply caused because you use random globally in your script elsewhere.
Try to make it RandonSpawnsArray or something:
PHP код:
new RandomSpawnsSomething = randomSpawnsSomething(sizeof(RandomSpawns));
|
No he doesnt need to update to fix that.
@OP: the errors you are getting means that you already have those 2 const/macros defined so what you can do is:
1- Search in your script for isnull and remove/rename it
2- Search in all of your includes for isnull and remove/rename it
Also for your Random warning, change Random to any other name lol you can make it xRandom = .. etc
Re: include that causes warning -
ivndosos - 19.01.2018
Ill try it, the weird thing is if i remove that include I wont have the error on random line hm.
Re: include that causes warning -
jasperschellekens - 19.01.2018
Quote:
Originally Posted by ivndosos
Ill try it, the weird thing is if i remove that include I wont have the error on random line hm.
|
Probably because the include is using random globally.
Re: include that causes warning -
Ritzy2K - 19.01.2018
Both of your warnings are nothing but warnings caused by multiple existence of same macros or variable. Just change your "Random" variable name to Random1 or random, and your isnull is defined multiple times.
Re: include that causes warning -
ivndosos - 19.01.2018
I didn't find anything in my gamemode that says isnull.
Re: include that causes warning -
RogueDrifter - 19.01.2018
Quote:
Originally Posted by ivndosos
I didn't find anything in my gamemode that says isnull.
|
Read what i said?
Quote:
No he doesnt need to update to fix that.
@OP: the errors you are getting means that you already have those 2 const/macros defined so what you can do is:
1- Search in your script for isnull and remove/rename it
2- Search in all of your includes for isnull and remove/rename it
Also for your Random warning, change Random to any other name lol you can make it xRandom = .. etc
|