- 0
Warning
-
Similar Content
-
- 2 answers
- 868 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
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
3 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now