i have 2 types of warnings and i dont know what they mean!
#1

PHP Code:
pwn(9429) : warning 219local variable "carid" shadows a variable at a preceding level
pwn
(9450) : warning 219local variable "carid" shadows a variable at a preceding level
pwn
(10364) : warning 217loose indentation
pwn
(10863) : warning 217loose indentation
pwn
(23972) : warning 217loose indentation
pwn
(45685) : warning 219local variable "playername" shadows a variable at a preceding level
pwn
(45725) : warning 217loose indentation
pwn
(45732) : warning 219local variable "playername" shadows a variable at a preceding level
pwn
(45772) : warning 217loose indentation
pwn
(45775) : warning 217loose indentation
pwn
(45902) : warning 217loose indentation
pwn
(67113) : warning 219local variable "lights" shadows a variable at a preceding level
pwn
(67113) : warning 219local variable "doors" shadows a variable at a preceding level
pwn
(67122) : warning 219local variable "lights" shadows a variable at a preceding level
pwn
(67122) : warning 219local variable "doors" shadows a variable at a preceding level
pwn
(68053) : warning 219local variable "lights" shadows a variable at a preceding level
pwn
(68053) : warning 219local variable "doors" shadows a variable at a preceding level
pwn
(68065) : warning 219local variable "lights" shadows a variable at a preceding level
pwn
(68065) : warning 219local variable "doors" shadows a variable at a preceding level
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
Header size
:          15516 bytes
Code size
:          3995372 bytes
Data size
:          3186568 bytes
Stack
/heap size:      16384 bytesestimated maxusage=4672 cells (18688 bytes)
Total requirements7213840 bytes
19 Warnings

can me anybody tell what this wartnings mean:
PHP Code:
local variable "SOMETHING" shadows a variable at a preceding level
and
loose indentation 
Reply
#2

About loose indentation take a look at this one https://sampforum.blast.hk/showthread.php?tid=274028
The other error i think was happening when you had a global variable and a local one with the same name.

For example at the top of the script you have "new playername" and somewhere in the middle of the script you also use again "new playername" to create a local variable.
Reply
#3

Tnx!
Reply
#4

Quote:
Originally Posted by Dark_Kostas
View Post
The other error i think was happening when you had a global variable and a local one with the same name.
For example at the top of the script you have "new playername" and somewhere in the middle of the script you also use again "new playername" to create a local variable.
This is NOT quite correct. The error does not only apply to global variables, but variables when re-defined within the region (scope) of the code.

pawn Code:
stock Function()
{
    new bool:variable = false;
    if(variable == false)
    {
        new variable;
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)