I got an error
#1

Код:
C:\Users\NivZiv\Desktop\YourGame\pawno\include\MidoStream.inc(27) : warning 219: local variable "id" shadows a variable at a preceding level
C:\Users\NivZiv\Desktop\YourGame\pawno\include\MidoStream.inc(33) : warning 219: local variable "id" shadows a variable at a preceding level
C:\Users\NivZiv\Desktop\YourGame\pawno\include\MidoStream.inc(41) : warning 219: local variable "id" shadows a variable at a preceding level
C:\Users\NivZiv\Desktop\pawno\include\MidoStream.inc(49) : warning 219: local variable "id" shadows a variable at a preceding level
C:\Users\NivZiv\Desktop\YourGame\pawno\include\MidoStream.inc(55) : warning 219: local variable "id" shadows a variable at a preceding level
C:\Users\NivZiv\Desktop\YourGame\pawno\include\MidoStream.inc(61) : warning 219: local variable "id" shadows a variable at a preceding level
C:\Users\NivZiv\Desktop\YourGame\pawno\include\MidoStream.inc(67) : warning 219: local variable "id" shadows a variable at a preceding level
C:\Users\NivZiv\Desktop\YourGame\pawno\include\Y_Objects.inc(123) : warning 201: redefinition of constant/macro (symbol "foreach(%1,%2)")
Reply
#2

You have declared "id" as global variable to your script which is also declared in MidoStream.inc file. Rename it to something else to get rid of the warnings 219.

As for the warning 201, "foreach" is already defined either in stand-alone foreach.inc file or as y_iterate.inc from YSI library. Open Y_Objects and rename "foreach" to some other name such as "for_loop". Even though, I wouldn't advise such style as it is not that hard to tap 5-10 buttons more.
Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
You have declared "id" as global variable to your script which is also declared in MidoStream.inc file. Rename it to something else to get rid of the warnings 219.

As for the warning 201, "foreach" is already defined either in stand-alone foreach.inc file or as y_iterate.inc from YSI library. Open Y_Objects and rename "foreach" to some other name such as "for_loop". Even though, I wouldn't advise such style as it is not that hard to tap 5-10 buttons more.
How I can fix it?
Reply
#4

I've told you the solution to both: re-naming those symbols will fix it.
Reply
#5

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
I've told you the solution to both: re-naming those symbols will fix it.
Yeah but how I re-name it, re-name "id" to "id1"
Reply
#6

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
I've told you the solution to both: re-naming those symbols will fix it.
Can you tell me what to do, step by step?
Reply
#7

To start off, is it necessary the variable you had declared "id" to be a global?

- If not, use local variables.
- If yes, re-name it to some other name. Have a name that will give a hint of what the variable is for.

---

Open Y_Objects.inc file and CTRL + H. Replace "foreach" with "for_loop" or whatever name you want.
Reply
#8

Midostream... Now that's something that is old as the hills. Any reason why you are using that old an include?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)