Warnings -
cigo - 11.07.2009
Код:
warning 219: local variable "X" shadows a variable at a preceding level
warning 219: local variable "Y" shadows a variable at a preceding level
warning 219: local variable "Z" shadows a variable at a preceding level
what these warnings mean? and how to fix them? I have 12 of them...
also - why cars, that spawning after typed command not spawn? after I type /gmx they work... samp bug, or what?
Re: Warnings -
MenaceX^ - 11.07.2009
You already have made these floats once.
Re: Warnings -
cigo - 11.07.2009
ok, now I fixed warnings, but how can I fix that other thing I posted?
before it worked - i don't know what I did to make them not work...
Re: Warnings -
cigo - 11.07.2009
anyone?
Re: Warnings -
MenaceX^ - 11.07.2009
What's the problem? The vehicles get loaded only after /gmx?
Re: Warnings -
cigo - 11.07.2009
no, problem is only with vehicles whats spawn after command typed.
on of my commands:
Код:
if(strcmp(cmdtext, "/nrg", true) == 0) {
if (gPlayerLevel[playerid] >= 1)
if (IsPlayerInAnyVehicle(playerid)) {
SendClientMessage(playerid,0xFF0606FF,"You already have a car!");
} else {
new Float:Angle;
new VehicleID;
GetPlayerPos(playerid,X,Y,Z); GetPlayerFacingAngle(playerid,Angle);
VehicleID = CreateVehicle(522,X,Y,Z,Angle,1,-1,-1); PutPlayerInVehicle(playerid,VehicleID,0);
if(GetPlayerInterior(playerid)) LinkVehicleToInterior(VehicleID,GetPlayerInterior(playerid));
SetVehicleVirtualWorld(VehicleID,GetPlayerVirtualWorld(playerid));
ChangeVehicleColor(VehicleID,0,7);
SendClientMessage(playerid,0x33AA33AA,"Enjoy");
if (gPlayerLevel[playerid] < 1)
SendClientMessage(playerid, 0xFF0606FF, "You are not allowed to use this command!");
}
return 1;
}
when I put the cmd in other gm, it works
p.s.
Код:
if (gPlayerLevel[playerid] >= 1)
^ that is part of my levels system
Re: Warnings -
MenaceX^ - 11.07.2009
I still don't understand you.
When doesn't it work?
Re: Warnings -
cigo - 11.07.2009
if i type command /nrg - car have to spawn next to me.
but when i type /nrg - shows message ''enjoy'', but car is missing
when i type /gmx - it works
Re: Warnings -
MenaceX^ - 11.07.2009
I don't understand you.
You actualy just said if you type /nrg it works
Then you said if you type /nrg it doesn't..
Re: Warnings -
cigo - 11.07.2009
step by step...
1 - i join my server
2 - i type cmd /nrg - nothing happens
3 - i type /gmx (it restarts my gm)
4 - i type /nrg - i've got my car
i can't explain better..