Hallo, ich habe bei mir ins Script einen /gethere Befehl reingemacht aber leider bekomme ich 4 Errors.
ocmd:gethere(playerid,params[])
{
new plid,Float:pX,Float:pY,Float:pZ,string[128],pName[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(sscanf(params,"u",plid)) return SendClientMessage(playerid,0xFFFFFF55,"Benutzung: /gethere [ID/Name]");
if(IsPlayerInAnyVehicle(plid))
{
GetPlayerPos(playerid,pX,pY,pZ); SetVehiclePos(GetPlayerVehicleID(plid),pX+1,pY+1,pZ); GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),"Admin %s hat dich zu sich teleportiert!",pName); SendClientMessage(plid,0xDEDE00FF,string);
} else {
GetPlayerPos(playerid,pX,pY,pZ); SetPlayerPos(plid,pX+1,pY+1,pZ); GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),"Admin %s hat dich zu sich teleportiert!",pName); SendClientMessage(plid,0xDEDE00FF,string);
}
}
return SendClientMessage(playerid,0xFFFFFF55,"Der Befehl ist nicht für dich!");
}
Errors:
C:\Users\GKNBond\Desktop\Selfmade\gamemodes\Selfmade.pwn(1095) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Users\GKNBond\Desktop\Selfmade\gamemodes\Selfmade.pwn(1096) : error 017: undefined symbol "PlayerInfo"
C:\Users\GKNBond\Desktop\Selfmade\gamemodes\Selfmade.pwn(1096) : warning 215: expression has no effect
C:\Users\GKNBond\Desktop\Selfmade\gamemodes\Selfmade.pwn(1096) : error 001: expected token: ";", but found "]"
C:\Users\GKNBond\Desktop\Selfmade\gamemodes\Selfmade.pwn(1096) : error 029: invalid expression, assumed zero
C:\Users\GKNBond\Desktop\Selfmade\gamemodes\Selfmade.pwn(1096) : fatal error 107: too many error messages on one line
PS: Ich habe schon viele Virianten ausprobiert, aber ich komme zu keiner Lösung
MfG: Bond