Error - Hilfe

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
  • public deliver()
    {
    new string[200];
    for(new playerid=0;playerid<MAX_PLAYERS;playerid++)
    {
    if(PlayerToPoint(3.0,playerid,2063.2549,-1584.8943,13.4809) || PlayerToPoint(3.0,playerid,2235.2610,-1170.7758,1029.7969))
    {
    if(WatchingTV[playerid] == 1)
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Du kannst keinen Materialien verkaufen, während du TV schaust !");
    return 1;
    }
    if(MatsHolding[playerid] > 0)
    {
    new payout = (50)*(MatsHolding[playerid]);
    format(string, sizeof(string), "* The Factory gave you %d Materials for your %d Materials Packages.", payout, MatsHolding[playerid]);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    PlayerInfo[playerid][pMats] += payout;
    MatsHolding[playerid] = 0;
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " You don't have any Materials Packages !");
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " You are not at the Materials Factory in Los Santos !");
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Invalid Materials Name !");
    return 1;
    }
    }
    return 1;
    }
    }


    (1702) : error 029: invalid expression, assumed zero
    (1704) : error 017: undefined symbol "playerid"
    (1708) : error 010: invalid function or declaration

    Einmal editiert, zuletzt von MrReece ()

  • public deliver()
    {
    new string[200];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(PlayerToPoint(3.0,i,2063.2549,-1584.8943,13.4809) || PlayerToPoint(3.0,i,2235.2610,-1170.7758,1029.7969))
    {
    if(WatchingTV[i] == 1)
    {
    SendClientMessage(i, COLOR_GRAD1, "Du kannst keinen Materialien verkaufen, während du TV schaust !");
    return 1;
    }
    if(MatsHolding[i] > 0)
    {
    new payout = (50)*(MatsHolding[i]);
    format(string, sizeof(string), "* The Factory gave you %d Materials for your %d Materials Packages.", payout, MatsHolding[i]);
    SendClientMessage(i, COLOR_LIGHTBLUE, string);
    PlayerInfo[i][pMats] += payout;
    MatsHolding[i] = 0;
    }
    else
    {
    SendClientMessage(i, COLOR_GREY, " You don't have any Materials Packages !");
    return 1;
    }
    }
    else
    {
    SendClientMessage(i, COLOR_GREY, " You are not at the Materials Factory in Los Santos !");
    return 1;
    }
    }
    else
    {
    SendClientMessage(i, COLOR_GREY, " Invalid Materials Name !");
    return 1;
    }
    }
    return 1;
    }
    }


    Probiers mal so...

    ...