SA-MP Forums Archive
warning - 'time' - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: warning - 'time' (/showthread.php?tid=620918)



warning - 'time' - ImTouchk - 04.11.2016

hello all, i'm getting 2 warnings:
C:\Users\mugur\Desktop\Scripting gamemode\pawno\include\YSI\..\YSI_Storage\..\YSI_C ore\..\YSI_Coding\y_va/impl.inc(539) : warning 219: local variable "time" shadows a variable at a preceding level
C:\Users\mugur\Desktop\Scripting gamemode\pawno\include\YSI\..\YSI_Storage\..\YSI_C ore\..\YSI_Coding\y_va/impl.inc(544) : warning 219: local variable "time" shadows a variable at a preceding level


544 TextDrawColor(TD_iPhone[8], 255);

539 (blank line between 2 textdraws)
or that or something else bugs my script that don't starts....
please, help


Re: warning - 'time' - Vince - 04.11.2016

Don't create global variables with generic names like "time". Also the messages are referring to impl.inc, not your script.


Re: warning - 'time' - ImTouchk - 04.11.2016

Quote:
Originally Posted by Vince
View Post
Don't create global variables with generic names like "time". Also the messages are referring to impl.inc, not your script.
new Text:TD_iPhone_Time[3];
that's single global variable that is used ONLY in ongamemodeinit

stock va_GameTextForPlayer(playerid, const fmat[], time, style, va_args<>)
{
return GameTextForPlayer(playerid, va_return(fmat, va_start<4>), time, style);
}
stock va_GameTextForAll(const fmat[], time, style, va_args<>)
{
return GameTextForAll(va_return(fmat, va_start<3>), time, style);
}
539 & 544 from warnings