Habe ein paar Errors wegbekommen aber die nich:
Zitat
C:\Users\Sebastian\Desktop\SA-MP 0.3x Server\gamemodes\lernen.pwn(37) : error 076: syntax error in the expression, or invalid function call
C:\Users\Sebastian\Desktop\SA-MP 0.3x Server\gamemodes\lernen.pwn(39) : error 035: argument type mismatch (argument 2)
C:\Users\Sebastian\Desktop\SA-MP 0.3x Server\gamemodes\lernen.pwn(44) : error 035: argument type mismatch (argument 1)
C:\Users\Sebastian\Desktop\SA-MP 0.3x Server\gamemodes\lernen.pwn(46) : warning 202: number of arguments does not match definition
C:\Users\Sebastian\Desktop\SA-MP 0.3x Server\gamemodes\lernen.pwn(55) : error 035: argument type mismatch (argument 1)
C:\Users\Sebastian\Desktop\SA-MP 0.3x Server\gamemodes\lernen.pwn(230) : error 035: argument type mismatch (argument 2)
C:\Users\Sebastian\Desktop\SA-MP 0.3x Server\gamemodes\lernen.pwn(260) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Sebastian\Desktop\SA-MP 0.3x Server\gamemodes\lernen.pwn(264) : warning 219: local variable "key" shadows a variable at a preceding level
C:\Users\Sebastian\Desktop\SA-MP 0.3x Server\gamemodes\lernen.pwn(268) : error 035: argument type mismatch (argument 1)
C:\Users\Sebastian\Desktop\SA-MP 0.3x Server\gamemodes\lernen.pwn(269) : error 035: argument type mismatch (argument 1)
C:\Users\Sebastian\Desktop\SA-MP 0.3x Server\gamemodes\lernen.pwn(264) : warning 203: symbol is never used: "key"
C:\Users\Sebastian\Desktop\SA-MP 0.3x Server\gamemodes\lernen.pwn(264 -- 271) : warning 219: local variable "key" shadows a variable at a preceding level
C:\Users\Sebastian\Desktop\SA-MP 0.3x Server\gamemodes\lernen.pwn(275) : error 035: argument type mismatch (argument 1)
C:\Users\Sebastian\Desktop\SA-MP 0.3x Server\gamemodes\lernen.pwn(277) : error 035: argument type mismatch (argument 2)
C:\Users\Sebastian\Desktop\SA-MP 0.3x Server\gamemodes\lernen.pwn(282) : error 035: argument type mismatch (argument 2)
C:\Users\Sebastian\Desktop\SA-MP 0.3x Server\gamemodes\lernen.pwn(271) : warning 203: symbol is never used: "key"
C:\Users\Sebastian\Desktop\SA-MP 0.3x Server\gamemodes\lernen.pwn(291) : error 035: argument type mismatch (argument 1)
C:\Users\Sebastian\Desktop\SA-MP 0.3x Server\gamemodes\lernen.pwn(292) : error 035: argument type mismatch (argument 1)
C:\Users\Sebastian\Desktop\SA-MP 0.3x Server\gamemodes\lernen.pwn(299) : error 035: argument type mismatch (argument 1)
C:\Users\Sebastian\Desktop\SA-MP 0.3x Server\gamemodes\lernen.pwn(300) : error 035: argument type mismatch (argument 1)
C:\Users\Sebastian\Desktop\SA-MP 0.3x Server\gamemodes\lernen.pwn(303) : warning 203: symbol is never used: "SpielerDaten"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
14 Errors.
Alles anzeigen
Zeile 37-60:
public OnPlayerConnect(playerid)
{
if(strfind(name, "_", false, false) == -1 && !IsPlayerNPC(playerid))
{
SendClientMessage(playerid,ROT,"Bitte deinen Namen ändern ![Vorname_Nachname] !");
}
new string[128];
format(string, sizeof(string),"/Accounts/%s.ini",name(playerid));
if(dini_Exists(spieler))
{
ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "Login-System","Herzlich Willkommen %s !\n Bitte gib dein Passwort ein, um dich einzuloggen.","Eingabe","Abbruch", name(playerid));
}
else
{
ShowPlayerDialog(playerid, REGISTER, DIALOG_STYLE_INPUT, "Registration"," Herzlich Willkommen !\n Bitte gib dein gewünschtes Paswort ein, um dich zu registrieren.","Eingabe","Abbruch");
}
new connectm[128];
format(connectm,sizeof(connectm),"[JOIN] %s hat den Server betreten.",name(playerid));
SendClientMessageToAll(BLAU,connectm);
return 1;
}
220-250:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == REGISTER)
{
if(response == 0) return Kick(playerid);
if(response == 1)
{
new pw = strlen(inputtext);
if(pw < 6)
{
SendClientMessage(playerid, ROT," Das Passwort muss min. 7 Zeichen enthalten !");
ShowPlayerDialog(playerid, REGISTER, DIALOG_STYLE_INPUT, "Registration"," Herzlich Willkommen !\n Bitte gib dein gewünschtes Paswort ein, um dich zu registrieren.","Eingabe","Abbruch");
return 1;
}
Register(playerid, MD5_Hash(inputtext));
}
}
if(dialogid == LOGIN)
{
if(response == 0) return Kick(playerid);
if(response == 1)
{
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid, LOGIN,DIALOG_STYLE_PASSWORD,"Login","Bitte gib das Passwort erneut ein.","Eingabe","Abbruch");
}
Login(playerid, MD5_Hash(inputtext));
}
}
return 1;
}
Und der Rest:
stock name(playerid)
{
new name[24];
GetPlayerName(playerid, name, sizeof(name));
return name;
}
stock Register(playerid, key[])
{
new string[128];
format(string, sizeof(string),"Accounts/%s.ini",name(playerid));
dini_Create(spieler);
dini_Set(spieler,"Key",key);
}
stock Login(playerid, key[])
{
new string[128];
format(string, sizeof(string), "/Accounts/%s.ini",name(playerid));
if(!strcmp(key,dini_Get(spieler,"Key"),false))
{
SendClientMessage(playerid,ROT,"Das Passwort ist falsch, versuch es erneut !");
ShowPlayerDialog(playerid, LOGIN,DIALOG_STYLE_PASSWORD,"Login","Bitte gib das Passwort erneut ein.","Eingabe","Abbruch");
}
else
{
SendClientMessage(playerid,BLAU,"Erfolgreich eingeloggt, %s !",name(playerid));
SpielerLaden(playerid);
}
return 1;
}
stock SpielerLaden(playerid)
{
new string[128];
format(string, sizeof(string),"/Accounts/%s.ini",name(playerid));
GivePlayerMoney(playerid,dini_Int(spieler,"geld"));
SetPlayerScore(playerid,dini_Int(spieler,"level"));
return 1;
}
stock SpielerSpeichern(playerid)
{
new string[128];
format(string, sizeof(string),"/Accounts/%s.ini",name(playerid));
dini_IntSet(spieler, "geld",GetPlayerMoney(playerid));
dini_IntSet(spieler, "level",GetPlayerScore(playerid));
return 1;
}