y_commands problem that I cannot figure out
#1

I've searched and searched tried all the solutions but nothing works. I do not have a used variable called "HASH" or anything like that. I know they are warnings but they drive me crazy. How could I fix this?
Quote:

C:\Users\Joseph\Desktop\SAMP\samp-serv\pawno\include\YSI\y_commands.inc(904) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\Users\Joseph\Desktop\SAMP\samp-serv\pawno\include\YSI\y_commands.inc(1405) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\Users\Joseph\Desktop\SAMP\samp-serv\pawno\include\YSI\y_commands.inc(1460) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\Users\Joseph\Desktop\SAMP\samp-serv\pawno\include\YSI\y_commands.inc(1513) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\Users\Joseph\Desktop\SAMP\samp-serv\pawno\include\YSI\y_commands.inc(1535) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\Users\Joseph\Desktop\SAMP\samp-serv\pawno\include\YSI\y_commands.inc(1598) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\Users\Joseph\Desktop\SAMP\samp-serv\pawno\include\YSI\y_commands.inc(1826) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\Users\Joseph\Desktop\SAMP\samp-serv\pawno\include\YSI\y_commands.inc(1930) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\Users\Joseph\Desktop\SAMP\samp-serv\pawno\include\YSI\y_commands.inc(2071) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\Users\Joseph\Desktop\SAMP\samp-serv\pawno\include\YSI\y_commands.inc(2365) : warning 219: local variable "hash" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


10 Warnings.

Thanks for the help if you give any, sorry if I did something dumb that I missed :L
~Hiukuss
Reply
#2

It's most probably another one of your includes above y_commands that creates a variable with the name hash. Delete one of the hash variables and it should be fine.
Reply
#3

Quote:
Originally Posted by [HiC]TheKiller
Посмотреть сообщение
It's most probably another one of your includes above y_commands that creates a variable with the name hash. Delete one of the hash variables and it should be fine.
this is some bad bad bad advice!
and will most likely introduce new problems.

im surprised to see y_commands has such a generic var name like
hash and not gYHash or something along them lines. If thats even the case,

an option would to be to bring this to ******'s attetion in the y_command topic and see
if he has a quick fix.
Reply
#4

Quote:
Originally Posted by Jonny5
Посмотреть сообщение
an option would to be to bring this to ******'s attetion in the y_command topic and see
if he has a quick fix.
Why would you bother asking if it's a pretty obvious solution? It may be worth PMing ****** about the variable name, but otherwise why? If deleting the variable causes issues, rename it in one of the includes.
Reply
#5

There is the hash variable that coincides with that which has ****** in y_commands. There are two solutions:
1) Rename the variable or in your gm / fs or nell'include (Which would not recommend nell'include)
2) Delete the variable in your gm / fs

PS: Sorry for my bad english i'm italian.
Reply
#6

Quote:
Originally Posted by [HiC]TheKiller
Посмотреть сообщение
Why would you bother asking if it's a pretty obvious solution? It may be worth PMing ****** about the variable name, but otherwise why? If deleting the variable causes issues, rename it in one of the includes.
dont try to redeem your bad advice but trying to make me look stupid,
I said ask ****** as he knows the ins and outs of YSI better than anyone,
and as you see he explained it here already without even asking.

@******
yeah i did not think that was the case,but am surprised to see such a generic var used by you
even if its local. I try to listen about the hole naming convention but even have generics myself.

@op

in the top of you game mode add
before all includes
pawn Код:
new hash;
and see if the error pops up in another include also,
this will hopefully help you track what other file is using this symbol.
Reply
#7

YL,
please dont take offence, i did not mean it that in a bad way. And im not blaming you for anything.
I try to follow the same practices of you and some of the other top coders here.
I have read many many many of your posts and heard you talk about naming convention,
this is why i was surprised, but we are all only human man! And im sure your reasons for the generic name are good
ones, (backward compatible) might be one i dont know ,dont really matter at this point.
I do realize your var was local.


what do you recommend as a solution to the OP?
can he change your local "hash" var to something else or do you recommend
him finding the global and fixing it?

im off to work,

regards
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)