Guten Tag,
Bei meinem Autohaus System habe ich 9 Warnings.
Hier die Warnings:
[pwn]C:\Users\Alex\Desktop\Reallístic-Life Selfmade Script\gamemodes\Selfmade.pwn(3448) : warning 219: local variable "engine" shadows a variable at a preceding level
C:\Users\Alex\Desktop\Reallístic-Life Selfmade Script\gamemodes\Selfmade.pwn(3448) : warning 219: local variable "lights" shadows a variable at a preceding level
C:\Users\Alex\Desktop\Reallístic-Life Selfmade Script\gamemodes\Selfmade.pwn(3448) : warning 219: local variable "alarm" shadows a variable at a preceding level
C:\Users\Alex\Desktop\Reallístic-Life Selfmade Script\gamemodes\Selfmade.pwn(3448) : warning 219: local variable "doors" shadows a variable at a preceding level
C:\Users\Alex\Desktop\Reallístic-Life Selfmade Script\gamemodes\Selfmade.pwn(3448) : warning 219: local variable "bonnet" shadows a variable at a preceding level
C:\Users\Alex\Desktop\Reallístic-Life Selfmade Script\gamemodes\Selfmade.pwn(3448) : warning 219: local variable "boot" shadows a variable at a preceding level
C:\Users\Alex\Desktop\Reallístic-Life Selfmade Script\gamemodes\Selfmade.pwn(3448) : warning 219: local variable "objective" shadows a variable at a preceding level
C:\Users\Alex\Desktop\Reallístic-Life Selfmade Script\gamemodes\Selfmade.pwn(3548) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Alex\Desktop\Reallístic-Life Selfmade Script\gamemodes\Selfmade.pwn(3558) : warning 219: local variable "string" shadows a variable at a preceding level[/pwn]
Hier der Code:
[pwn] if(strcmp(cmd, "/lock", true) == 0)
{
if(PlayerInfo[playerid][pKey] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED,"Du besitzt kein Auto !");
new Float: X, Float: Y, Float: Z;
GetVehiclePos(PlayerInfo[playerid][pKey], X, Y, Z);
if(PlayerToPoint(10.0, playerid, X, Y, Z))
{
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(PlayerInfo[playerid][pKey], engine, lights, alarm, doors, bonnet, boot, objective);
if(doors == 0)
{
SetVehicleParamsEx(PlayerInfo[playerid][pKey], engine, lights, alarm, 1, bonnet, boot, objective);
GameTextForPlayer(playerid, "~r~Abgeschlossen", 5000, 5);
}
else
{
SetVehicleParamsEx(PlayerInfo[playerid][pKey], engine, lights, alarm, 0, bonnet, boot, objective);
GameTextForPlayer(playerid, "~g~Aufgeschlossen", 5000, 5);
}
}
else
{
return SendClientMessage(playerid, COLOR_LIGHTRED,"Du befindest dich nicht in der Nähe von deinem Auto !");
}
return 1;
}[/pwn]
Bei meinem Autohaus System habe ich 9 Warnings.
Hier die Warnings:
[pwn]C:\Users\Alex\Desktop\Reallístic-Life Selfmade Script\gamemodes\Selfmade.pwn(3448) : warning 219: local variable "engine" shadows a variable at a preceding level
C:\Users\Alex\Desktop\Reallístic-Life Selfmade Script\gamemodes\Selfmade.pwn(3448) : warning 219: local variable "lights" shadows a variable at a preceding level
C:\Users\Alex\Desktop\Reallístic-Life Selfmade Script\gamemodes\Selfmade.pwn(3448) : warning 219: local variable "alarm" shadows a variable at a preceding level
C:\Users\Alex\Desktop\Reallístic-Life Selfmade Script\gamemodes\Selfmade.pwn(3448) : warning 219: local variable "doors" shadows a variable at a preceding level
C:\Users\Alex\Desktop\Reallístic-Life Selfmade Script\gamemodes\Selfmade.pwn(3448) : warning 219: local variable "bonnet" shadows a variable at a preceding level
C:\Users\Alex\Desktop\Reallístic-Life Selfmade Script\gamemodes\Selfmade.pwn(3448) : warning 219: local variable "boot" shadows a variable at a preceding level
C:\Users\Alex\Desktop\Reallístic-Life Selfmade Script\gamemodes\Selfmade.pwn(3448) : warning 219: local variable "objective" shadows a variable at a preceding level
C:\Users\Alex\Desktop\Reallístic-Life Selfmade Script\gamemodes\Selfmade.pwn(3548) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Alex\Desktop\Reallístic-Life Selfmade Script\gamemodes\Selfmade.pwn(3558) : warning 219: local variable "string" shadows a variable at a preceding level[/pwn]
Hier der Code:
[pwn] if(strcmp(cmd, "/lock", true) == 0)
{
if(PlayerInfo[playerid][pKey] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED,"Du besitzt kein Auto !");
new Float: X, Float: Y, Float: Z;
GetVehiclePos(PlayerInfo[playerid][pKey], X, Y, Z);
if(PlayerToPoint(10.0, playerid, X, Y, Z))
{
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(PlayerInfo[playerid][pKey], engine, lights, alarm, doors, bonnet, boot, objective);
if(doors == 0)
{
SetVehicleParamsEx(PlayerInfo[playerid][pKey], engine, lights, alarm, 1, bonnet, boot, objective);
GameTextForPlayer(playerid, "~r~Abgeschlossen", 5000, 5);
}
else
{
SetVehicleParamsEx(PlayerInfo[playerid][pKey], engine, lights, alarm, 0, bonnet, boot, objective);
GameTextForPlayer(playerid, "~g~Aufgeschlossen", 5000, 5);
}
}
else
{
return SendClientMessage(playerid, COLOR_LIGHTRED,"Du befindest dich nicht in der Nähe von deinem Auto !");
}
return 1;
}[/pwn]
[Blockierte Grafik: http://www.abload.de/img/atroxssigisdrj1w.jpg]