include that causes warning
#1

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));
Reply
#2

Update your incs. Redownload all YSI includes
Reply
#3

It is updated.
Reply
#4

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)); 
Reply
#5

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
Reply
#6

Ill try it, the weird thing is if i remove that include I wont have the error on random line hm.
Reply
#7

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.
Reply
#8

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.
Reply
#9

I didn't find anything in my gamemode that says isnull.
Reply
#10

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

Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)