Sublime Text Editor 3 - warning problems
#1

I start working on new script and now my Sublime Text shows a lot of warnings:

PHP Code:
warning 219local variable "i" shadows a variable at a preceding level
warning 219
local variable "i" shadows a variable at a preceding level
warning 219
local variable "i" shadows a variable at a preceding level
warning 219
local variable "i" shadows a variable at a preceding level
warning 219
local variable "i" shadows a variable at a preceding level
warning 219
local variable "i" shadows a variable at a preceding level
warning 219
local variable "i" shadows a variable at a preceding level
warning 219
local variable "i" shadows a variable at a preceding level
warning 219
local variable "i" shadows a variable at a preceding level
warning 219
local variable "i" shadows a variable at a preceding level
warning 219
local variable "i" shadows a variable at a preceding level
warning 219
local variable "i" shadows a variable at a preceding level
warning 219
local variable "i" shadows a variable at a preceding level
warning 219
local variable "i" shadows a variable at a preceding level 
Does anyone know the fix? I know what warning means but I don't have time and nerves to go and fix over 1000 variable names... in more than 1 file.
Reply
#2

that looks like you did something like this:
PHP Code:
new i;
public 
OnPlayerConnect(playerid)
{
    for(new 
ii<MAX_PLAYERSi++;)
    { 
//..etc

that's why you should leave such single letters for loops only.
EDIT:
All you need to do is find the new i; on top of your script somewhere and simply remove it.
Reply
#3

But if "i" is declared again, isn't its value erased ? - meaning it has NULL, empty value.
Mostly variables are re-usable with no problems...
Global and Local variables dont have conflict, variables inside procedures and functions are local.
Maybe sa:mp script works differently...
Reply
#4

In Pawno everything is fine but in Sublime I got warning from script and includes also...
Reply
#5

Maybe Sublime is over-reacting

Does Sublime have built-in error checking for Pawno or c++ ?
Reply
#6

Quote:
Originally Posted by VeryTallMidget
View Post
Maybe Sublime is over-reacting
Do you even know what the fuck are you talking about? A BIG-ASS NO.
Reply
#7

I'm using it and i never faced any problems, perhaps you should try using zeexs compiler as the build system?
Reply
#8

Someone?
Reply
#9

Go back to where you last used ` i ` as a variable and look for any problems.

are you using modules?
Reply
#10

Quote:
Originally Posted by Arthur Kane
View Post
Go back to where you last used ` i ` as a variable and look for any problems.

are you using modules?
No, I'm not using modules.
Reply
#11

do you have use space intendation on?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)