[HELP]GetPlayerScore + GetPlayerName

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
  • //stats
    if(!strcmp(strget(cmdtext,0),"/stats"))
    {
    if(!strlen(strget(cmdtext,1)))
    return
    SendClientMessage(playerid,COLOR_FADE4,"Use: /stats");
    new eins;
    new zwei[MAX_PLAYER_NAME];
    new string[256];
    GetPlayerScore(playerid,eins,sizeof(eins));
    GetPlayerName(playerid,zwei,sizeof(zwei));
    format(string, sizeof(string), "**Account** Name: %s Deaths: %s", zwei, eins);
    SendClientMessage(playerid,COLOR_FADE5, string);
    return 1;
    }


    Errors:
    gamemodes\BJ.pwn(5184) : warning 202: number of arguments does not match definition
    gamemodes\BJ.pwn(5184) : warning 202: number of arguments does not match definition
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


    2 Warnings.


    Zeile 5184:
    GetPlayerScore(playerid,eins,sizeof(eins));


    könnt ihr mir helfen?

  • Umändern in:


    eins = GetPlayerScore(playerid);


    Edit: Da war wohl jemand schneller als ich^^

    mfg RedDragon 8)


    Was ist GFKD?


    Ein revolutionärer Clan, dessen Eröffnung kurz bevorsteht.
    Mehr Informationen folgen bald.

  • if(!strcmp(strget(cmdtext,0),"/stats"))
    {
    if(!strlen(strget(cmdtext,1)))
    return
    SendClientMessage(playerid,COLOR_FADE4,"Use: /stats");
    eins = GetPlayerScore(playerid);
    new zwei[MAX_PLAYER_NAME];
    new string[256];
    GetPlayerScore(playerid,eins,sizeof(eins));
    GetPlayerName(playerid,zwei,sizeof(zwei));
    format(string, sizeof(string), "**Account** Name: %s Deaths: %s", zwei, eins);
    SendClientMessage(playerid,COLOR_FADE5, string);
    return 1;
    }


    Errors:
    gamemodes\BJ.pwn(5181) : error 017: undefined symbol "eins"
    gamemodes\BJ.pwn(5184) : error 017: undefined symbol "eins"
    gamemodes\BJ.pwn(5184) : error 017: undefined symbol "eins"
    gamemodes\BJ.pwn(5184) : error 029: invalid expression, assumed zero
    gamemodes\BJ.pwn(5184) : fatal error 107: too many error messages on one line


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



    5 Errors.

  • if(!strcmp(strget(cmdtext,0),"/stats"))
    {
    if(!strlen(strget(cmdtext,1)))
    return
    SendClientMessage(playerid,COLOR_FADE4,"Use: /stats");
    new eins = GetPlayerScore(playerid);
    new zwei[MAX_PLAYER_NAME];
    new string[256];
    GetPlayerScore(playerid,eins,sizeof(eins));
    GetPlayerName(playerid,zwei,sizeof(zwei));
    format(string, sizeof(string), "**Account** Name: %s Deaths: %s", zwei, eins);
    SendClientMessage(playerid,COLOR_FADE5, string);
    return 1;
    }

    The fact is, I am right. And if you think I'm wrong, you are wrong.

  • gamemodes\BJ.pwn(5184) : warning 202: number of arguments does not match definition
    gamemodes\BJ.pwn(5184) : warning 202: number of arguments does not match definition
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


    2 Warnings.


    Zeile:
    GetPlayerScore(playerid,eins,sizeof(eins));

  • immer noch die gleichen Errors -,-


    //stats
    if(!strcmp(strget(cmdtext,0),"/stats"))
    {
    if(!strlen(strget(cmdtext,1)))
    return
    SendClientMessage(playerid,COLOR_FADE4,"Use: /stats");
    new eins = GetPlayerScore(playerid);
    new zwei[MAX_PLAYER_NAME];
    new string[256];
    GetPlayerName(playerid,zwei,sizeof(zwei));
    GetPlayerScore(playerid,eins,sizeof(eins));
    format(string, sizeof(string), "**Account** Name: %s Deaths: %s", zwei, eins);
    SendClientMessage(playerid,COLOR_FADE5, string);
    return 1;
    }

  • so schwer?


    //stats
    if(!strcmp(strget(cmdtext,0),"/stats"))
    {
    if(!strlen(strget(cmdtext,1)))
    return
    SendClientMessage(playerid,COLOR_FADE4,"Use: /stats");
    new eins = GetPlayerScore(playerid);
    new zwei[MAX_PLAYER_NAME];
    new string[256];
    GetPlayerName(playerid,zwei,sizeof(zwei));
    format(string, sizeof(string), "**Account** Name: %s Deaths: %d", zwei, eins);// hier war auch noch nen fehler: intager != String
    SendClientMessage(playerid,COLOR_FADE5, string);
    return 1;
    }