5 warnings << unreachable code / warning variable
#1

i have warnings in my script here is the code:

4 warnings -
pawn Код:
WARNINGS LIST:

pawno\include\YSI\..\YSI_Coding\y_va/impl.inc(539) : warning 219: local variable "time" shadows a variable at a preceding level
pawno\include\YSI\..\YSI_Coding\y_va/impl.inc(544) : warning 219: local variable "time" shadows a variable at a preceding level
pawno\include\YSI\..\YSI_Coding\y_timers/impl.inc(84) : warning 219: local variable "time" shadows a variable at a preceding level
pawno\include\evf.inc(2059) : warning 219: local variable "time" shadows a variable at a preceding level

warning: 1336 line << unreachable code >>

pawn Код:
1336 if(!IsPlayerInRangeOfPoint(playerid, 2, PhoneStoreEntrance[0], PhoneStoreEntrance[1], PhoneStoreEntrance[2]))                         

1337           GetPlayerPos(playerid, pRestorePos[playerid][0], pRestorePos[playerid][1], pRestorePos[playerid][2]);
1338            GetPlayerFacingAngle(playerid, pRestorePos[playerid][3]);
1339        pRestorePos[playerid][3] = ((_:pRestorePos[playerid][3]+180) % 360);
Reply
#2

warning 219: local variable "time" shadows a variable at a preceding level

This means you have a global or semi-global(idk how to say it) variable named "time". Just rename your variable.

Unreachable code, this means that the code will never be executed, are you using `return` just above the code?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)