Beiträge von sunny607

    ocmd:buyhaus(playerid)
    {
    new ID=GetNearestHaus(playerid,4);
    if(ID==-1) return SendClientMessage(playerid,-1,"Du bist nicht in der Nahe eines Hauses");
    if(GetPlayerMoney(playerid)<Haus[ID][Preis]) return SendClientMessage(playerid,-1,"Soviel Geld hast du nicht bei dir");
    if(!strcmp(Haus[ID][Besitzer],"Niemand"))
    {
    GetPlayerName(playerid,Haus[ID][Besitzer],MAX_PLAYER_NAME);
    DestroyPickup(Haus[ID][PickupID]);
    RemovePlayerMapIcon(playerid,STARTMAPICON+ID);
    SetPlayerMapIcon(playerid,STARTMAPICON+ID,Haus[ID][Pos][0],Haus[ID][Pos][1],Haus[ID][Pos][2],32,0xFFFFFFFF);
    Haus[ID][PickupID] = CreatePickup(1239,1,Haus[ID][Pos][0],Haus[ID][Pos][1],Haus[ID][Pos][2]);
    new string[65];
    format(string,65,"Dieses Haus gehoert:\n%s%s",Haus[ID][Besitzer],(Haus[ID][Abgeschlossen])?("\n\nAbgeschlossen"):(""));
    Update3DTextLabelText(Haus[ID][Label],0x33AA33FF,string);
    return true;
    }
    return SendClientMessage(playerid,-1,"Dieses Haus kann man nicht kaufen");
    }



    die Häuser werden automatisch geladen

    Code
    15:13:19] [debug] Server crashed while executing Haussystem.amx
    [15:13:19] [debug] AMX backtrace:
    [15:13:19] [debug] #0 native fwrite () from samp03svr
    [15:13:19] [debug] #1 000016a4 in ?? (0) from Haussystem.amx
    [15:13:19] [debug] #2 000035c4 in public ocmd_speicherhauser (2, 90464) from Haussystem.amx

    ja alle plugins eingetragen wie im home server weiß echt nicht an was das liegt



    das steht in der log


    [13:09:45] [debug] Run time error 4: "Array index out of bounds"
    [13:09:45] [debug] Accessing element at index 593 past array upper bound 301
    [13:09:45] [debug] AM

    kann mir hier jemand helfen?


    test\pawno\rl.pwn(40451) : error 017: undefined symbol "SpielerInfo"
    rl.pwn(40451) : warning 215: expression has no effect
    rlpwn(40451) : error 001: expected token: ";", but found "]"
    rl.pwn(40451) : error 029: invalid expression, assumed zero
    pwn(40451) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.



    und so steht es im scrip


    if(strcmp(cmd, "/givemats", true) == 0)
    {
    if (SpielerInfo[playerid][pAdmin] >= 4)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /givemats [playerid/PartOfName] [amount]");
    return 1;
    }
    //giveplayerid = strval(tmp);
    giveplayerid = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /givemats [playerid/PartOfName] [amount]");
    return 1;
    }
    new playa;
    GetPlayerName(playa, sendername, sizeof(sendername));
    playa = ReturnUser(tmp);
    moneys = strval(tmp);
    SpielerInfo[giveplayerid][pMats] = moneys;
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, 256, "AdmWarning: %s hat %s %d Materialien gegeben.", sendername,giveplayer,moneys);
    ABroadCast(COLOR_YELLOW,string,1);
    }
    }
    return 1;
    }

    Habe das problem


    if(strcmp(cmd, "/ao", true) == 0 || strcmp(cmd, "/ai", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if (PlayerInfo[playerid][pAdmin] >= 1)
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' '))
    {
    idx++;
    }
    new offset = idx;
    new result[64];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
    result[idx - offset] = cmdtext[idx];
    idx++;
    }
    result[idx - offset] = EOS;
    if(!strlen(result))
    {
    SendClientMessage(playerid, COLOR_RED, "Benutze: (/a)dmin [admin chat]");
    return 1;
    }


    if(PlayerInfo[playerid][pAdmin] == 1 || PlayerInfo[playerid][pAdmin] == 2 || PlayerInfo[playerid][pAdmin] == 3)
    {
    format(string, sizeof(string),"Supporter %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 4 || PlayerInfo[playerid][pAdmin] == 5)
    {
    format(string, sizeof(string),"Administrator %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 1338)
    {
    format(string, sizeof(string), "Communityleiter %s: %s", sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 2000)
    {
    format(string, sizeof(string), "Communitygründer %s: %s", sendername, result);
    }
    if (PlayerInfo[playerid][pAdmin] >= 1)
    {
    SendAdminMessage(0xFF00A5FF, string);
    }
    printf("Admin %s: %s", sendername, result);
    } else {
    SendClientMessage(playerid, COLOR_GRAD1, " Du darfst diesen Befehl nicht benutzen !");
    }
    }
    return 1;
    }


    diese befehl sollte eine nachricht an den server schicken womit es alles lesen könne


    ingame kommt zwar eine neue zeile bleibt aber unsichtbar könnt ihr mir da helfen lg sunny