HO UN PROBLEMA CON DEI FILESCRIPT DI PAWNO
POTETE AIUTARMI PER FAVORE
#include <a_samp>
#include <dini>
enum InfoGiocatore
{ Livello, Uccisioni, Morti, Loggato };
new Giocatore[MAX_PLAYERS][InfoGiocatore];
new nome[25];
new stringa[250];
public OnPlayerConnect(playerid)
{
GetPlayerName(playerid,nome,sizeof(nome));
format(stringa,sizeof(stringa),"Utenti/%s.ini",nome);
if(!dini_Exists(stringa)) //Controlliamo se non esiste il file
ShowPlayerDialog(playerid,DIALOGREG,DIALOG_STYLE_INPUT,"Registrazione","Benvenuto nel server. Immetti una password per registrarti","Registrati","");
else //Se il file esiste
ShowPlayerDialog(playerid,DIALOGLOGIN,DIALOG_STYLE_INPUT,"Login","Bentornato nel server. Immetti la password per loggarti","Login","");
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
if(!Giocatore[playerid][Loggato]) return 1;
GetPlayerName(playerid,nome,sizeof(nome));
format(stringa,sizeof(stringa),”Utenti/%s”,nome);
dini_IntSet(stringa,”Livello”,Giocatore*playerid+*Livello+);
dini_IntSet(stringa,”Morti”,Giocatore*playerid+*Morti+);
dini_IntSet(stringa,”Uccisioni”,Giocatore*playerid+*Uccisioni+);
Giocatore[playerid][Loggato]=0;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
Giocatore[playerid][Morti]++;
Giocatore[killerid][Uccisioni]++;
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid==DIALOGREG)
{
if(!response) return Kick(playerid); //Kicka il player che non si registra
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOGREG,DIALOG_STYLE_INPUT,”Registrazione”,”INSERISCI UNA PASSWORD\n Immetti una password per registrarti”,”Registrati”,””);
GetPlayerName(playerid,nome,sizeof(nome));
format(stringa,sizeof(stringa),”Utenti/%s”,nome);
dini_Create(stringa); //Creiamo il file per l’account utente
dini_IntSet(stringa,”Livello”,0);
dini_IntSet(stringa,”Uccisioni”,0);
dini_IntSet(stringa,”Morti”,0);
dini_Set(stringa,”Password”,inputtext);
ShowPlayerDialog(playerid,DIALOGLOGIN,DIALOG_STYLE_INPUT,”Login”,”Ora sei registrato. Immetti la password per loggarti”,”Login”,””);
return 1;
{
if(dialogid==DIALOGLOGIN)
{
if(!response ) return Kick(playerid);
GetPlayerName(playerid,nome,sizeof(nome));
format(stringa,sizeof(stringa),”Utenti/%s”,nome);
new Pass[250];
Pass=dini_Get(stringa,”Password”);
if(strcmp(Pass,inputtext,true) || !strlen(inputtext))
{
ShowPlayerDialog(playerid,DIALOGLOGIN,DIALOG_STYLE_INPUT,”Login”,”PASSWORD INCORRETTA \nImmetti la password per loggarti”,”Login”,””);
return 1;
}
Giocatore[playerid][Livello]=dini_Int(stringa,”Livello”);
Giocatore[playerid][Morti]=dini_Int(stringa,”Morti”);
Giocatore[playerid][Uccisioni]=dini_Int(stringa,”Uccisioni”);
Giocatore[playerid][Loggato]=1;
return 1;
}
GLI ERRORI SONO
C:\Users\Utente\Desktop\Progetto JDK DM\gamemodes\JDK DM.pwn(64) : error 017: undefined symbol "nome"
C:\Users\Utente\Desktop\Progetto JDK DM\gamemodes\JDK DM.pwn(64) : error 017: undefined symbol "nome"
C:\Users\Utente\Desktop\Progetto JDK DM\gamemodes\JDK DM.pwn(64) : error 029: invalid expression, assumed zero
C:\Users\Utente\Desktop\Progetto JDK DM\gamemodes\JDK DM.pwn(64) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
SU QUESTO
GetPlayerName(playerid,nome,sizeof(nome));
AIUTATEMI PER FAVORE
Pagina 1 di 1
[HELP] PLEASE
Pagina 1 di 1