/goto fehler

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Guten Tag,


    ich habe folgenes Problhem, wenn ich mich zu einem Spieler porte geht alles.
    Aber wenn ich mich zu einen admin der aduty ist stop der server bzw schmiert ab.
    Wodran kann dieses liegen ??



    COMMAND:goto(playerid,params[])
    {
    new pID,string[128],Float:x,Float:y,Float:z;
    if(ImTutorial[playerid] != 0)return ImTutorial_MSG(playerid);
    if(GetPVarInt(playerid,"Eingeloggt") == 0)return Eingeloggt_MSG(playerid);
    if(Spieler[playerid][pAWAYFROMKEYBOARD] == 1)return AFK_MSG(playerid);
    if(Spieler[playerid][pInPrison] == 1)return Prison_MSG(playerid);
    if(Spieler[playerid][pFriedhof] == 1)return TOT_MSG(playerid);
    if(Spieler[playerid][pDeath] == 1)return DAMAGE_MSG(playerid);
    if(Spieler[playerid][pJailed] != 0)return KNAST_MSG(playerid);
    if(Spieler[playerid][pTazerd] == 1)return TAZER_MSG(playerid);
    if(Spieler[playerid][pCuffed] == 1)return CUFF_MSG(playerid);
    if(!isPlayerAnAdmin(playerid,1))return ADMIN_MSG(playerid);
    if(Spieler[playerid][pAdminOnduty] == false)return SCM(playerid,SAMP_GRUEN,""IINFO" du bist nicht im Admindienst.");
    if(sscanf(params,"u",pID))return SCM(playerid,SAMP_GRUEN,""#IINFO" /goto [playerid/Name]");
    if(!IsPlayerConnected(pID))return Eingeloggt_MSG(playerid);
    if(GetPVarInt(pID,"Eingeloggt") == 0)return Eingeloggt_MSG(playerid);
    if(IsPlayerNPC(pID))return SCM(playerid,SAMP_WEISS,""IINFO" das kannst du nicht!");
    if(pID == playerid)return SCM(playerid,SAMP_GRUEN,"IINFO du kannst dich nicht zu dir teleportieren.");
    GetPlayerPos(pID,x,y,z);
    if(IsPlayerInAnyVehicle(playerid))
    {
    new seatid = GetPlayerVehicleSeat(playerid);
    SetPlayerPosEx(playerid,x,y + 4,z);
    SetVehiclePosEx(GetPlayerVehicleID(playerid),x,y + 4,z);
    PutPlayerInVehicleEx(playerid,GetPlayerVehicleID(playerid),seatid);
    SetPlayerInterior(playerid,GetPlayerInterior(pID));
    SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(pID));
    LinkVehicleToInterior(GetPlayerVehicleID(playerid),GetPlayerInterior(pID));
    SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),GetPlayerVirtualWorld(pID));
    format(string,sizeof(string),"%s hat sich zu dir geportet.",SpielerName(playerid));
    SCM(pID,SAMP_GRUEN,string);
    format(string,sizeof(string),""IINFO" du hast dich zu %s geportet.",SpielerName(pID));
    SCM(playerid,SAMP_GRUEN,string);
    }
    else
    {
    SetPlayerPosEx(playerid,x,y + 1,z);
    SetPlayerInterior(playerid,GetPlayerInterior(pID));
    SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(pID));
    format(string,sizeof(string),"%s hat sich zu dir geportet.",SpielerName(playerid));
    SCM(pID,SAMP_WEISS,string);
    format(string,sizeof(string),""IINFO" du hast dich zu %s geportet.",SpielerName(pID));
    SCM(playerid,SAMP_GRUEN,string);
    }
    return 1;
    }



    Weis jemand was ich dagegen machen kann?


    Danke im forraus.

    Einmal editiert, zuletzt von Electronic ()

  • [16:50:09] [debug] Server crashed while executing script.amx
    [16:50:09] [debug] AMX backtrace:
    [16:50:09] [debug] #0 native format () from samp4862_6364
    [16:50:09] [debug] #1 001cfc40 in public cmd_goto () from script.amx
    [16:50:09] [debug] #2 native CallLocalFunction () from samp4862_6364
    [16:50:09] [debug] #3 0000ad8c in public OnPlayerCommandText (18, 26132792) from script.amx
    [16:50:09] [debug] Native backtrace:
    [16:50:09] [debug] #0 b6639180 in _Z13GetStackTraceRSt6vectorI10StackFrameSaIS0_EEPv () from plugins/crashdetect.so
    [16:50:09] [debug] #1 b6631064 in _ZN11CrashDetect20PrintNativeBacktraceERSoRKN2os7ContextE () from plugins/crashdetect.so
    [16:50:09] [debug] #2 b6631d64 in _ZN11CrashDetect20PrintNativeBacktraceERKN2os7ContextE () from plugins/crashdetect.so
    [16:50:09] [debug] #3 b6633cdb in _ZN11CrashDetect7OnCrashERKN2os7ContextE () from plugins/crashdetect.so
    [16:50:09] [debug] #4 b66384d5 in ?? () from plugins/crashdetect.so
    [16:50:09] [debug] #5 b77d7600 in __kernel_rt_sigreturn () from linux-gate.so.1
    [16:50:09] [debug] #6 080965d7 in ?? () from ./samp4862_6364
    [16:50:09] [debug] #7 080dce72 in ?? () from ./samp4862_6364
    [16:50:09] [debug] #8 080950e4 in ?? () from ./samp4862_6364
    [16:50:09] [debug] #9 b6632ad3 in _ZN11CrashDetect17HandleAMXCallbackEiPiS0_ () from plugins/crashdetect.so
    [16:50:09] [debug] #10 00000002 in ?? () from ·y·Hµy·¼’é
    [16:50:09] [debug] ¼’é
    [16:50:09] [debug] ½”é
    [16:50:09] [debug] ¼’é
    [16:50:09] [debug] ­•é
    [16:50:09] [debug] ¼–é
    [16:50:09] [debug] Dz·
    [16:50:09] [debug] Registers:
    [16:50:09] [debug] EAX: 00000044 EBX: 00000032 ECX: 081cb620 EDX: 00000000
    [16:50:09] [debug] ESI: 00000000 EDI: 00000080 EBP: bf818838 ESP: bf818810
    [16:50:09] [debug] EIP: 080965d7 EFLAGS: 00010293
    [16:50:09] [debug] Stack:
    [16:50:09] [debug] ESP+00000000: 081cb620 00000032 b53b3ccc 0a220e90
    [16:50:09] [debug] ESP+00000020: 0a220e90 0a220e90 bf818868 080dce72
    [16:50:09] [debug] ESP+00000040: 00000080 0193ee10 00000032 00000000
    [16:50:09] [debug] ESP+00000060: 0a220e90 b58480a8 ffffffff b662a14a
    [16:50:09] [debug] ESP+00000080: 0a220e90 0a0f3208 bf818cbc b6632ad3
    [16:50:09] [debug] ESP+000000a0: 001cfc40 00000013 b77ea5bb b764d000
    [16:50:09] [debug] ESP+000000c0: 0a0c3af0 00000000 00000000 00000002
    [16:50:09] [debug] ESP+000000e0: bf818970 00000001 0000001a b764d000
    [16:50:09] [debug] ESP+00000100: 00000003 8334615b bf81d272 00000000
    [16:50:09] [debug] ESP+00000120: bf818fb4 00000001 00000014 b764d000
    [16:50:09] [debug] ESP+00000140: bf818ab0 b77f7d20 bf818978 b75eb58a
    [16:50:09] [debug] ESP+00000160: 0000001a 00000800 bf818a98 b77c1e31
    [16:50:09] [debug] ESP+00000180: 0a220e90 00000000 00000000 001cfc40
    [16:50:09] [debug] ESP+000001a0: 0059e090 0000000b 0a0c0850 0a0c0848
    [16:50:09] [debug] ESP+000001c0: bf818a98 bf818990 b77e66bf b665dff4
    [16:50:09] [debug] ESP+000001e0: 0a0f3208 00000013 bf818a8c b58480a8
    [16:50:09] [debug] ESP+00000200: 0a0dd774 00000000 00000000 0a220e90
    [16:50:09] [debug] ESP+00000220: 0a220e90 00000013 bf818a8c b58480a8
    [16:50:09] [debug] ESP+00000240: b3f09238 0193ee70 018ec1c8 0193ee10
    [16:50:09] [debug] ESP+00000260: 006084a0 018ec1c8 00000000 b3e9ee4c
    [16:50:09] [debug] ESP+00000280: bf818b08 00000001 0a220e90 b665dff4
    [16:50:09] [debug] ESP+000002a0: 0a220e90 bf818cbc 000001f5 0193f140
    [16:50:09] [debug] ESP+000002c0: 00000001 0a0c3920 bf818af8 b6268b14
    [16:50:09] [debug] ESP+000002e0: 00000002 b62ff3c0 bf818bc8 b6268f38
    [16:50:09] [debug] ESP+00000300: 0193f140 0000ad8c 000001f5 0abf9848
    [16:50:09] [debug] ESP+00000320: 00000008 00000012 018ec15c 080ad806
    [16:50:09] [debug] ESP+00000340: 00000003 b77d4000 00000034 b75567cd
    [16:50:09] [debug] ESP+00000360: 0a220e90 0a0f3208 000001f5 b6637384
    [16:50:09] [debug] ESP+00000380: 00000000 0a220e90 bf818ba8 b6268bfe
    [16:50:09] [debug] ESP+000003a0: 0a220e90 00000001 00268d2b b62ff3c0
    [16:50:09] [debug] ESP+000003c0: 0a220e90 bf818cbc 000001f5 bf818cbc
    [16:50:09] [debug] ESP+000003e0: 7fffffff 0a220e90 b38fe2c2 0a220e90
    [16:50:09] [debug] Loaded modules:
    [16:50:09] [debug] 00000000 - 00187dc3 samp4862_6364
    [16:50:09] [debug] b77d9000 - b77d9704 linux-gate.so.1
    [16:50:09] [debug] b77c1000 - b77c381f /lib/i386-linux-gnu/libdl.so.2
    [16:50:09] [debug] b77a6000 - b77c02f3 /lib/i386-linux-gnu/libpthread.so.0
    [16:50:09] [debug] b76b3000 - b77accda /usr/lib/i386-linux-gnu/libstdc++.so.6
    [16:50:09] [debug] b766e000 - b76b1ab7 /lib/i386-linux-gnu/libm.so.6
    [16:50:09] [debug] b7651000 - b766d3c4 /lib/i386-linux-gnu/libgcc_s.so.1
    [16:50:09] [debug] b74dd000 - b7658ddb /lib/i386-linux-gnu/libc.so.6
    [16:50:09] [debug] b77d8000 - b77f8600 /lib/ld-linux.so.2
    [16:50:09] [debug] b74c9000 - b74d8344 plugins/sscanf.so
    [16:50:09] [debug] b727a000 - b74c9676 plugins/mysql_static.so
    [16:50:09] [debug] b77cb000 - b77d2093 /lib/i386-linux-gnu/librt.so.1
    [16:50:09] [debug] b665f000 - b666a3ef /lib/i386-linux-gnu/libnss_files.so.2
    [16:50:09] [debug] b661b000 - b665dac4 plugins/crashdetect.so
    [16:50:09] [debug] b6243000 - b630139a plugins/streamer.so


    Das ist die log einmal

  • Versuch mall bitte so

    COMMAND:goto(playerid,params[])
    {
    new pID,string[128],Float:x,Float:y,Float:z;
    /*if(ImTutorial[playerid] != 0)return ImTutorial_MSG(playerid);
    if(GetPVarInt(playerid,"Eingeloggt") == 0)return Eingeloggt_MSG(playerid);
    if(Spieler[playerid][pAWAYFROMKEYBOARD] == 1)return AFK_MSG(playerid);
    if(Spieler[playerid][pInPrison] == 1)return Prison_MSG(playerid);
    if(Spieler[playerid][pFriedhof] == 1)return TOT_MSG(playerid);
    if(Spieler[playerid][pDeath] == 1)return DAMAGE_MSG(playerid);
    if(Spieler[playerid][pJailed] != 0)return KNAST_MSG(playerid);
    if(Spieler[playerid][pTazerd] == 1)return TAZER_MSG(playerid);
    if(Spieler[playerid][pCuffed] == 1)return CUFF_MSG(playerid);*/
    if(!isPlayerAnAdmin(playerid,1))return ADMIN_MSG(playerid);
    if(Spieler[playerid][pAdminOnduty] == false)return SCM(playerid,SAMP_GRUEN,""IINFO" du bist nicht im Admindienst.");
    if(sscanf(params,"u",pID))return SCM(playerid,SAMP_GRUEN,""#IINFO" /goto [playerid/Name]");
    if(!IsPlayerConnected(pID))return Eingeloggt_MSG(playerid);
    if(GetPVarInt(pID,"Eingeloggt") == 0)return Eingeloggt_MSG(playerid);
    if(IsPlayerNPC(pID))return SCM(playerid,SAMP_WEISS,""IINFO" das kannst du nicht!");
    if(pID == playerid)return SCM(playerid,SAMP_GRUEN,"IINFO du kannst dich nicht zu dir teleportieren.");
    GetPlayerPos(pID,x,y,z);
    if(IsPlayerInAnyVehicle(playerid))
    {
    new seatid = GetPlayerVehicleSeat(playerid);
    SetPlayerPosEx(playerid,x,y + 4,z);
    SetVehiclePosEx(GetPlayerVehicleID(playerid),x,y + 4,z);
    PutPlayerInVehicleEx(playerid,GetPlayerVehicleID(playerid),seatid);
    SetPlayerInterior(playerid,GetPlayerInterior(pID));
    SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(pID));
    LinkVehicleToInterior(GetPlayerVehicleID(playerid),GetPlayerInterior(pID));
    SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),GetPlayerVirtualWorld(pID));
    format(string,sizeof(string),"%s hat sich zu dir geportet.",SpielerName(playerid));
    SCM(pID,SAMP_GRUEN,string);
    format(string,sizeof(string),""IINFO" du hast dich zu %s geportet.",SpielerName(pID));
    SCM(playerid,SAMP_GRUEN,string);
    }
    else
    {
    SetPlayerPosEx(playerid,x,y + 1,z);
    SetPlayerInterior(playerid,GetPlayerInterior(pID));
    SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(pID));
    format(string,sizeof(string),"%s hat sich zu dir geportet.",SpielerName(playerid));
    SCM(pID,SAMP_WEISS,string);
    format(string,sizeof(string),""IINFO" du hast dich zu %s geportet.",SpielerName(pID));
    SCM(playerid,SAMP_GRUEN,string);
    }
    return 1;
    }

  • [17:24:14] [debug] Server crashed while executing script.amx
    [17:24:14] [debug] AMX backtrace:
    [17:24:14] [debug] #0 native format () from samp4862_6364
    [17:24:14] [debug] #1 001cf80c in public cmd_goto () from script.amx
    [17:24:14] [debug] #2 native CallLocalFunction () from samp4862_6364
    [17:24:14] [debug] #3 0000ad8c in public OnPlayerCommandText (15, 26132248) from script.amx
    [17:24:14] [debug] Native backtrace:
    [17:24:14] [debug] #0 b62db180 in _Z13GetStackTraceRSt6vectorI10StackFrameSaIS0_EEPv () from plugins/crashdetect.so
    [17:24:14] [debug] #1 b62d3064 in _ZN11CrashDetect20PrintNativeBacktraceERSoRKN2os7ContextE () from plugins/crashdetect.so
    [17:24:14] [debug] #2 b62d3d64 in _ZN11CrashDetect20PrintNativeBacktraceERKN2os7ContextE () from plugins/crashdetect.so
    [17:24:14] [debug] #3 b62d5cdb in _ZN11CrashDetect7OnCrashERKN2os7ContextE () from plugins/crashdetect.so
    [17:24:14] [debug] #4 b62da4d5 in ?? () from plugins/crashdetect.so
    [17:24:14] [debug] #5 b779f600 in __kernel_rt_sigreturn () from linux-gate.so.1
    [17:24:14] [debug] #6 080965d7 in ?? () from ./samp4862_6364
    [17:24:14] [debug] #7 080dce72 in ?? () from ./samp4862_6364
    [17:24:14] [debug] #8 080950e4 in ?? () from ./samp4862_6364
    [17:24:14] [debug] #9 b62d4ad3 in _ZN11CrashDetect17HandleAMXCallbackEiPiS0_ () from plugins/crashdetect.so
    [17:24:14] [debug] #10 00000002 in ?? () from 7v·H5v·
    [17:24:14] [debug]
    [17:24:14] [debug] ¢
    [17:24:14] [debug]
    [17:24:14] [debug] õ¢
    [17:24:14] [debug] ¤
    [17:24:14] [debug] Äv·
    [17:24:14] [debug] Registers:
    [17:24:14] [debug] EAX: 0000007b EBX: 00000048 ECX: 081cb620 EDX: 00000000
    [17:24:14] [debug] ESI: 00000000 EDI: 00000080 EBP: bfd797f8 ESP: bfd797d0
    [17:24:14] [debug] EIP: 080965d7 EFLAGS: 00010297
    [17:24:14] [debug] Stack:
    [17:24:14] [debug] ESP+00000000: 081cb620 00000048 b5399620 09493e78
    [17:24:14] [debug] ESP+00000020: 09493e78 09493e78 bfd79828 080dce72
    [17:24:14] [debug] ESP+00000040: 00000080 0193ebf0 00000048 00000000
    [17:24:14] [debug] ESP+00000060: 09493e78 b582da54 ffffffff b62cc14a
    [17:24:14] [debug] ESP+00000080: 09493e78 09373d88 bfd79c7c b62d4ad3
    [17:24:14] [debug] ESP+000000a0: 001cf80c 00000013 b77b25bb b7615000
    [17:24:14] [debug] ESP+000000c0: 09336af0 00000000 00000000 00000002
    [17:24:14] [debug] ESP+000000e0: 0933e0e5 bfd799d1 09336920 b7615000
    [17:24:14] [debug] ESP+00000100: 0933d8fc 00000008 bfd79918 00000000
    [17:24:14] [debug] ESP+00000120: bfd79f74 00000001 00000014 b75b358a
    [17:24:14] [debug] ESP+00000140: bfd79a70 b77bfd20 bfd79938 b75b358a
    [17:24:14] [debug] ESP+00000160: 09493e78 00000000 bfd79a58 b7789e31
    [17:24:14] [debug] ESP+00000180: 09493e78 00000000 00000000 001cf80c
    [17:24:14] [debug] ESP+000001a0: 0059dc5c 0000000b 09333850 09333848
    [17:24:14] [debug] ESP+000001c0: bfd79a58 bfd79950 b77ae6bf b62ffff4
    [17:24:14] [debug] ESP+000001e0: 09373d88 00000013 bfd79a4c b582da54
    [17:24:14] [debug] ESP+00000200: 09493e78 000000b7 bfd79c5c 09493e78
    [17:24:14] [debug] ESP+00000220: 09493e78 00000013 bfd79a4c b582da54
    [17:24:14] [debug] ESP+00000240: b3eeee04 0193ec50 018ebfa8 0193ebf0
    [17:24:14] [debug] ESP+00000260: 0060806c 018ebfa8 00000000 b3e84a18
    [17:24:14] [debug] ESP+00000280: bfd79ac8 00000001 09493e78 b62ffff4
    [17:24:14] [debug] ESP+000002a0: 09493e78 bfd79c7c 000001f5 0193ef20
    [17:24:14] [debug] ESP+000002c0: 00000001 09336920 bfd79ab8 b6224b14
    [17:24:14] [debug] ESP+000002e0: 00000002 b62bb3c0 bfd79b88 b6224f38
    [17:24:14] [debug] ESP+00000300: 0193ef20 0000ad8c 000001f5 09344c90
    [17:24:14] [debug] ESP+00000320: 00000008 0000000f 018ebf3c b751e7cd
    [17:24:14] [debug] ESP+00000340: 09493e78 09373d88 00000034 b751e7cd
    [17:24:14] [debug] ESP+00000360: 09493e78 09373d88 000001f5 b62d9384
    [17:24:14] [debug] ESP+00000380: 00000000 09493e78 bfd79b68 b6224bfe
    [17:24:14] [debug] ESP+000003a0: 09493e78 00000001 00224d2b b62bb3c0
    [17:24:14] [debug] ESP+000003c0: 09493e78 bfd79c7c 000001f5 bfd79c7c
    [17:24:14] [debug] ESP+000003e0: 7fffffff 09493e78 b38e42c2 09493e78
    [17:24:14] [debug] Loaded modules:
    [17:24:14] [debug] 00000000 - 00187dc3 samp4862_6364
    [17:24:14] [debug] b77a1000 - b77a1704 linux-gate.so.1
    [17:24:14] [debug] b7789000 - b778b81f /lib/i386-linux-gnu/libdl.so.2
    [17:24:14] [debug] b776e000 - b77882f3 /lib/i386-linux-gnu/libpthread.so.0
    [17:24:14] [debug] b767b000 - b7774cda /usr/lib/i386-linux-gnu/libstdc++.so.6
    [17:24:14] [debug] b7636000 - b7679ab7 /lib/i386-linux-gnu/libm.so.6
    [17:24:14] [debug] b7619000 - b76353c4 /lib/i386-linux-gnu/libgcc_s.so.1
    [17:24:14] [debug] b74a5000 - b7620ddb /lib/i386-linux-gnu/libc.so.6
    [17:24:14] [debug] b77a0000 - b77c0600 /lib/ld-linux.so.2
    [17:24:14] [debug] b7491000 - b74a0344 plugins/sscanf.so
    [17:24:14] [debug] b7242000 - b7491676 plugins/mysql_static.so
    [17:24:14] [debug] b7793000 - b779a093 /lib/i386-linux-gnu/librt.so.1
    [17:24:14] [debug] b6627000 - b66323ef /lib/i386-linux-gnu/libnss_files.so.2
    [17:24:14] [debug] b62bd000 - b62ffac4 plugins/crashdetect.so
    [17:24:14] [debug] b61ff000 - b62bd39a plugins/streamer.so


    das ist die neue log

  • Probiere es mal so



    if(IsPlayerInAnyVehicle(pID))
    {
    new seatid = GetPlayerVehicleSeat(pID);
    SetPlayerPosEx(playerid,x,y + 4,z);
    SetVehiclePosEx(GetPlayerVehicleID(playerid),x,y + 4,z);
    PutPlayerInVehicleEx(playerid,GetPlayerVehicleID(pID),seatid); //könnte aber auch daran liegen, das die Seatid besetzt ist.
    SetPlayerInterior(playerid,GetPlayerInterior(pID));
    SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(pID));
    LinkVehicleToInterior(GetPlayerVehicleID(playerid),GetPlayerInterior(pID));
    SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),GetPlayerVirtualWorld(pID));
    format(string,sizeof(string),"%s hat sich zu dir geportet.",SpielerName(playerid));
    SCM(pID,SAMP_GRUEN,string);
    format(string,sizeof(string),""IINFO" du hast dich zu %s geportet.",SpielerName(pID));
    SCM(playerid,SAMP_GRUEN,string);
    }
    else
    {
    SetPlayerPosEx(playerid,x,y + 1,z);
    SetPlayerInterior(playerid,GetPlayerInterior(pID));
    SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(pID));
    format(string,sizeof(string),"%s hat sich zu dir geportet.",SpielerName(playerid));
    SCM(pID,SAMP_WEISS,string);
    format(string,sizeof(string),""IINFO" du hast dich zu %s geportet.",SpielerName(pID));
    SCM(playerid,SAMP_GRUEN,string);
    }
    return 1;
    }