warnings and errors don't understand - 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: warnings and errors don't understand (
/showthread.php?tid=614470)
warnings and errors don't understand -
Skinnz - 08.08.2016
hello, i have a problem
(54813) : warning 219: local variable "ID" shadows a variable at a preceding level
(54813) : warning 213: tag mismatch
(54813) : warning 206: redundant test: constant expression is non-zero
(54813) : error 022: must be lvalue (non-constant)
(54813) : warning 203: symbol is never used: "ID"
(54813 -- 54825) : warning 225: unreachable code
PHP код:
function loadgraffs()
{
new string[32];
for(new ID; ID < 50; ID++)
{
format(string, sizeof(string), Graffitis, ID);
if(dini_Exists(string))
{
gInfo[ID][OBJECTID] = CreateDynamicObject( 19482, gInfo[ID][Xpos],gInfo[ID][Ypos],gInfo[ID][Zpos], gInfo[ID][XYpos], gInfo[ID][YYpos], gInfo[ID][ZYpos], -1, 0, -1, 200 ); //Creating the object
SetDynamicObjectMaterialText( gInfo[ID][OBJECTID], 0, gInfo[ID][graffname], OBJECT_MATERIAL_SIZE_256x256, "Diploma", 25, 0, 0xFFFFFFFF, 0, 1 ); // Setting the object text with our choosen graffiti text
}
}
return 1;
}
54813 = for(new ID; ID < 50; ID++)
Can you help me please ?
Respuesta: warnings and errors don't understand -
Skinnz - 08.08.2016
Re: warnings and errors don't understand -
Whatname - 08.08.2016
Change ID to something else and tell if you get errors
Re: warnings and errors don't understand - WhiteGhost - 08.08.2016
Quote:
Originally Posted by Whatname
Change ID to something else and tell if you get errors
|
What? Although You're Right..
You Have ID somewhere in your script
warning 219: local variable "ID" shadows a variable at a preceding level
Код:
for(new i; i <50; i++){
Re: warnings and errors don't understand -
Skinnz - 09.08.2016
Quote:
Originally Posted by Whatname
Change ID to something else and tell if you get errors
|
its good thank you