Moin Leute ich hab ne Problem mit dem Goto befehl
-
if(strcmp(cmdtext,"/goto",true) == 0)
{
new id;tmp = strtok(cmdtext, idx);
new giveplayer[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pAdminLevel]>=1)
{
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_WHITE,"[BENUTZUNG]: /goto [SpielerID]");
return 1;
}
id = strval(tmp);
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_WHITE, "Falsche SpielerID !");
new Float:X;
new Float:Y;
new Float:Z;
GetPlayerPos(id,X,Y,Z);
if(IsPlayerInAnyVehicle(playerid))
{
GetPlayerName(id, giveplayer, sizeof(id));
SetVehiclePos(GetPlayerVehicleID(playerid),X+2,Y+1,Z);
new string[256];
format(string, sizeof(string), "Du hast dich zu %s teleportiert.", id);
SendClientMessage(playerid,COLOR_WHITE, string);
}
else
{
SetPlayerPos(playerid,X,Y+1,Z);
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Du bist kein Admin !");
}
return 1;
}
C:\Users\PC\Desktop\progame\GGTTAA\gamemodes\xD.pwn(1570) : error 017: undefined symbol "tmp"
C:\Users\PC\Desktop\progame\GGTTAA\gamemodes\xD.pwn(1570) : error 017: undefined symbol "idx"
C:\Users\PC\Desktop\progame\GGTTAA\gamemodes\xD.pwn(1572) : error 017: undefined symbol "PlayerInfo"
C:\Users\PC\Desktop\progame\GGTTAA\gamemodes\xD.pwn(1572) : warning 215: expression has no effect
C:\Users\PC\Desktop\progame\GGTTAA\gamemodes\xD.pwn(1572) : error 001: expected token: ";", but found "]"
C:\Users\PC\Desktop\progame\GGTTAA\gamemodes\xD.pwn(1572) : error 029: invalid expression, assumed zero
C:\Users\PC\Desktop\progame\GGTTAA\gamemodes\xD.pwn(1572) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
[/list][/align]
Muss ich tmp und so define??