Fehler bein /showperso und /showlicense

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
  • Hallo,
    Ich habe ein /showperso und /showlicense Befehl gemacht jedoch kommen Fehler :/
    Hier der Code und die meldungen.
    Bread.pwn(3502) : warning 202: number of arguments does not match definition
    Bread.pwn(3503) : warning 202: number of arguments does not match definition
    Bread.pwn(3504) : error 001: expected token: ";", but found "-identifier-"
    Bread.pwn(4945) : warning 219: local variable "FrakName" shadows a variable at a preceding level
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Error.


    dcmd_showlicense(playerid,params[])
    {
    new pID, name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    GetPlayerName(pID,name2,sizeof(name2));
    if(sscanf(params,"u",pID))return SendClientMessage(playerid,Gelb,"/showlicenses[id]");
    SendClientMessage(playerid,Grün, "Du zeigst %s deine Lizenzen",name2);//3052
    SendClientMessage(pID,Grün,"%s zeigt dir seine Lizenzen",name)//3503
    ShowLicense(playerid,pID);//3504
    return 1;
    }
    ShowPerso(playerid,pID)
    {
    new string[128],string2[128],string3[128],FrakName[64], Spielername[MAX_PLAYER_NAME];//4945
    GetPlayerName(playerid,Spielername,sizeof(Spielername));
    switch(GetPVarInt(playerid,"Fraktion"))
    {
    case 0: format(FrakName,sizeof(FrakName),"Zivilist");
    case 1: format(FrakName,sizeof(FrakName),"LSPD");
    case 2: format(FrakName,sizeof(FrakName),"FBI");
    case 3: format(FrakName,sizeof(FrakName),"Army");
    case 4: format(FrakName,sizeof(FrakName),"Medic");
    case 5: format(FrakName,sizeof(FrakName),"Fahrschule");
    case 6: format(FrakName,sizeof(FrakName),"Taxi");
    case 7: format(FrakName,sizeof(FrakName),"Präsident");
    case 8: format(FrakName,sizeof(FrakName),"SA-News");
    case 9: format(FrakName,sizeof(FrakName),"Ordnungsamt");
    case 10: format(FrakName,sizeof(FrakName),"Groove St.");
    case 11: format(FrakName,sizeof(FrakName),"LCN");
    case 12: format(FrakName,sizeof(FrakName),"Ballas");
    case 13: format(FrakName,sizeof(FrakName),"LS Biker");
    case 14: format(FrakName,sizeof(FrakName),"Los Vagos");
    case 15: format(FrakName,sizeof(FrakName),"Yakuzza");
    case 16: format(FrakName,sizeof(FrakName),"Rifa");
    case 17: format(FrakName,sizeof(FrakName),"Terrorist");
    }
    SendClientMessage(pID,Grün,"|____________Personalien____________|");
    format(string,sizeof(string),"Name:%s",Spielername);
    format(string2,sizeof(string2),"Level:%i",GetPlayerScore(playerid));
    format(string3,sizeof(string3),"Beruf: %s",FrakName);
    SendClientMessage(pID,Weiß,string);
    SendClientMessage(pID,Weiß,string2);
    SendClientMessage(pID,Weiß,string3);
    SendClientMessage(pID,Grün,"|___________________________________|");
    return 1;
    }


    MfG Florian

    ↓Das ist der Youtube Channel von mir und meinen Kollegen↓



    Sa-Mp Server [Im Aufbau/Beta]
    128.65.216.200:7777

  • Ok habe ich nicht gesehen danke :)


    jetzt sind aber noch dir vorhanden:
    Bread.pwn(3502) : warning 202: number of arguments does not match definition
    Bread.pwn(3503) : warning 202: number of arguments does not match definition
    Bread.pwn(4945) : warning 219: local variable "FrakName" shadows a variable at a preceding level
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    3 Warnings.

    ↓Das ist der Youtube Channel von mir und meinen Kollegen↓



    Sa-Mp Server [Im Aufbau/Beta]
    128.65.216.200:7777

  • SendClientMessage(pID,Grün,"%s zeigt dir seine Lizenzen",name);
    zu
    new string[128];
    format(string,sizeof(string),"%s zeigt dir seine Lizenzen",name);
    SendClientMessage(pID,Grün,string);


    /e Poste mal die Codes von deinen Momentanigen Problem also alle fehler zeilen und 2 darüber/2 darunter

  • dcmd_showlicense(playerid,params[])
    {
    new pID, name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME],string[128];
    GetPlayerName(playerid,name,sizeof(name));
    GetPlayerName(pID,name2,sizeof(name2));
    if(sscanf(params,"u",pID))return SendClientMessage(playerid,Gelb,"/showlicenses[id]");
    format(string,sizeof string, "Du zeigst %s deine Lizenzen",name2);
    SendClientMessage(playerid,Grün,string);//3052
    format(string,sizeof string"%s zeigt dir seine Lizenzen",name)//3503
    SendClientMessage(playerid,Grün,string);//3052
    ShowLicense(playerid,pID);//3504
    return 1;
    }


  • case 0: format(FrakName,sizeof(FrakName),"Zivilist");
    case 1: format(FrakName,sizeof(FrakName),"LSPD");
    case 2: format(FrakName,sizeof(FrakName),"FBI");
    case 3: format(FrakName,sizeof(FrakName),"Army");
    case 4: format(FrakName,sizeof(FrakName),"Medic");
    case 5: format(FrakName,sizeof(FrakName),"Fahrschule");
    case 6: format(FrakName,sizeof(FrakName),"Taxi");
    case 7: format(FrakName,sizeof(FrakName),"Präsident");
    case 8: format(FrakName,sizeof(FrakName),"SA-News");
    case 9: format(FrakName,sizeof(FrakName),"Ordnungsamt");
    case 10: format(FrakName,sizeof(FrakName),"Groove St.");
    case 11: format(FrakName,sizeof(FrakName),"LCN");
    case 12: format(FrakName,sizeof(FrakName),"Ballas");
    case 13: format(FrakName,sizeof(FrakName),"LS Biker");
    case 14: format(FrakName,sizeof(FrakName),"Los Vagos");
    case 15: format(FrakName,sizeof(FrakName),"Yakuzza");
    case 16: format(FrakName,sizeof(FrakName),"Rifa");
    case 17: format(FrakName,sizeof(FrakName),"Terrorist");

    zu


    new ftext[20];
    if(GetPVarInt(playerid,"Fraktion") == 0){ ftext = "Zivilist"; }
    else if(GetPVarInt(playerid,"Fraktion") == 1){ ftext = ""; }
    else if(GetPVarInt(playerid,"Fraktion") == 2){ ftext = ""; }
    else if(GetPVarInt(playerid,"Fraktion") == 3){ ftext = ""; }
    else if(GetPVarInt(playerid,"Fraktion") == 4){ ftext = ""; }
    else if(GetPVarInt(playerid,"Fraktion")== 5){ ftext = ""; }
    else if(GetPVarInt(playerid,"Fraktion")== 6){ ftext = ""; }
    else if(GetPVarInt(playerid,"Fraktion")== 7){ ftext = ""; }
    else if(GetPVarInt(playerid,"Fraktion") == 8){ ftext = ""; }
    else if(GetPVarInt(playerid,"Fraktion")== 9){ ftext = ""; }



    einfach zu deinen Fraktionen ändern

  • Okay, keine Errors oder sonstiges melde mich noch mal wen was nicht geht :P
    Okay es geht so weit aber bei den Fraks steht kein name ?
    case 0: format(Frake,sizeof(Frake),"Zivilist");
    case 1: format(Frake,sizeof(Frake),"LSPD");
    case 2: format(Frake,sizeof(Frake),"FBI");
    case 3: format(Frake,sizeof(Frake),"Army");
    case 4: format(Frake,sizeof(Frake),"Medic");
    case 5: format(Frake,sizeof(Frake),"Fahrschule");
    case 6: format(Frake,sizeof(Frake),"Taxi");
    case 7: format(Frake,sizeof(Frake),"Präsident");
    case 8: format(Frake,sizeof(Frake),"SA-News");
    case 9: format(Frake,sizeof(Frake),"Ordnungsamt");
    case 10: format(Frake,sizeof(Frake),"Groove St.");
    case 11: format(Frake,sizeof(Frake),"LCN");
    case 12: format(Frake,sizeof(Frake),"Ballas");
    case 13: format(Frake,sizeof(Frake),"LS Biker");
    case 14: format(Frake,sizeof(Frake),"Los Vagos");
    case 15: format(Frake,sizeof(Frake),"Yakuzza");
    case 16: format(Frake,sizeof(Frake),"Rifa");
    case 17: format(Frake,sizeof(Frake),"Terrorist");

    ↓Das ist der Youtube Channel von mir und meinen Kollegen↓



    Sa-Mp Server [Im Aufbau/Beta]
    128.65.216.200:7777

    Einmal editiert, zuletzt von EliteBread ()

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • case 0: format(Frake,sizeof(Frake),"Zivilist");
    case 1: format(Frake,sizeof(Frake),"LSPD");
    case 2: format(Frake,sizeof(Frake),"FBI");
    case 3: format(Frake,sizeof(Frake),"Army");
    case 4: format(Frake,sizeof(Frake),"Medic");
    case 5: format(Frake,sizeof(Frake),"Fahrschule");
    case 6: format(Frake,sizeof(Frake),"Taxi");
    case 7: format(Frake,sizeof(Frake),"Präsident");
    case 8: format(Frake,sizeof(Frake),"SA-News");
    case 9: format(Frake,sizeof(Frake),"Ordnungsamt");
    case 10: format(Frake,sizeof(Frake),"Groove St.");
    case 11: format(Frake,sizeof(Frake),"LCN");
    case 12: format(Frake,sizeof(Frake),"Ballas");
    case 13: format(Frake,sizeof(Frake),"LS Biker");
    case 14: format(Frake,sizeof(Frake),"Los Vagos");
    case 15: format(Frake,sizeof(Frake),"Yakuzza");
    case 16: format(Frake,sizeof(Frake),"Rifa");
    case 17: format(Frake,sizeof(Frake),"Terrorist");
    Zeig mal das komplett also Befehl what ever, wo das drin ist..

  • ShowPerso(playerid,pID)
    {
    new string[128],string2[128],string3[128],Frake[64], Spielername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Spielername,sizeof(Spielername));
    switch(GetPVarInt(playerid,"Beruf"))
    {
    case 0: format(Frake,sizeof(Frake),"Zivilist");
    case 1: format(Frake,sizeof(Frake),"LSPD");
    case 2: format(Frake,sizeof(Frake),"FBI");
    case 3: format(Frake,sizeof(Frake),"Army");
    case 4: format(Frake,sizeof(Frake),"Medic");
    case 5: format(Frake,sizeof(Frake),"Fahrschule");
    case 6: format(Frake,sizeof(Frake),"Taxi");
    case 7: format(Frake,sizeof(Frake),"Präsident");
    case 8: format(Frake,sizeof(Frake),"SA-News");
    case 9: format(Frake,sizeof(Frake),"Ordnungsamt");
    case 10: format(Frake,sizeof(Frake),"Groove St.");
    case 11: format(Frake,sizeof(Frake),"LCN");
    case 12: format(Frake,sizeof(Frake),"Ballas");
    case 13: format(Frake,sizeof(Frake),"LS Biker");
    case 14: format(Frake,sizeof(Frake),"Los Vagos");
    case 15: format(Frake,sizeof(Frake),"Yakuzza");
    case 16: format(Frake,sizeof(Frake),"Rifa");
    case 17: format(Frake,sizeof(Frake),"Terrorist");
    }
    SendClientMessage(pID,Grün,"|____________Personalien____________|");
    format(string,sizeof(string),"Name: %s",Spielername);
    format(string2,sizeof(string2),"Level: %i",GetPlayerScore(playerid));
    format(string3,sizeof(string3),"Beruf: %s",Frake);
    SendClientMessage(pID,Weiß,string);
    SendClientMessage(pID,Weiß,string2);
    SendClientMessage(pID,Weiß,string3);
    SendClientMessage(pID,Grün,"|___________________________________|");
    return 1;
    }


    Wie mache ich das noch das das im
    DIALOG_STYLE_MSGBOX
    angezeigt wird ?

    ↓Das ist der Youtube Channel von mir und meinen Kollegen↓



    Sa-Mp Server [Im Aufbau/Beta]
    128.65.216.200:7777

  • Oben #define DIALOG_STATS (anpassen)


    format(string,sizeof(string),"Name: %s\nLevel: %i\nBeruf: %s",SpielerName,GetPlayerScore(playerid),Frake);
    ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYLE_MSGBOX,"Stats",string,"okay","");