- 0
Warning
-
Similar Content
-
- 2 replies
- 3,636 views
-
- 2 answers
- 504 views
-
- 2 replies
- 553 views
-
- 2 answers
- 421 views
-
- 3 answers
- 1,741 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
buNNy
Cum rezolv warningul asta?
fire2.inc(46) : warning 219: local variable "FIREID" shadows a variable at a preceding level
stock AddFire(Float:x, Float:y, Float:z, Health)
{
TotalFires++;
new FIREID = TotalFires; //Linia cu eroare
FireObj[FIREID] = CreateObject(3461, x, y, z-2.61, 0, 0, 0.0);
FirePos[FIREID][0] = x, FirePos[FIREID][1] = y, FirePos[FIREID][2] = z;
FireHealth[FIREID] = Health;
FireHealthMax[FIREID] = Health;
#if defined Labels
new string[128];
format(string, sizeof(string), "%d/%d", FireHealth[FIREID], FireHealthMax[FIREID]);
FireText[FIREID] = CreateDynamic3DTextLabel(string, 0xFFFFFFFFF, x, y, z, 20, 0);
#endif
}
stock DeleteFire(FIREID)
{
DestroyObject(FireObj[FIREID]);
TotalFires--;
FirePos[FIREID][0] = 0, FirePos[FIREID][1] = 0, FirePos[FIREID][2] = 0;
#if defined Labels
Delete3DTextLabel(FireText[FIREID]);
#endif
}
COMUNITATEA MEA DE RESURSE
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
www.codeup.ro / www.codeup.ro/forum
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.