Pomoc oko Login/register

Započeo L3O NO.T{a]G R[u] L {e], Mart 08, 2010, 17:33:19 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Evo trebam pomoc ja napravim slijedece

forward OnPlayerLogin(playerid,password[]);
forward OnPlayerUpdate(playerid);
forward OnPlayerRegister(playerid, password[]);
forward Encrypt(string[]);

new gPlayerLogged[MAX_PLAYERS];
new gPlayerLogTries[MAX_PLAYERS];
new gPlayerSpawned[MAX_PLAYERS];
new gActivePlayers[MAX_PLAYERS];
new gPlayerAccount[MAX_PLAYERS];
new numplayers = 0;
new FirstSpawn[MAX_PLAYERS];
new KickPlayer[MAX_PLAYERS];
new OnPlayerLogin[MAX_PLAYERS];
new OnPlayerRegister[MAX_PLAYERS];

enum pInfo
{
pKey[128],
pLevel,
pAdmin,
pAccount,
}

new PlayerInfo[MAX_PLAYERS][pInfo];



i dodam ono sa foruma

if (gPlayerAccount[playerid] != 0)
{
new loginstring[128];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"Dobro dosli, %s\nTaj nadimak je registriran.\nLogirajte se:",loginname);
ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Izlaz");
SendClientMessage(playerid, COLOR_LIGHTRED, "Ako se ne logirate u roku od 30s bit cete izbaceni sa servera!");
}
else
{
SendClientMessage(playerid, COLOR_YELLOW2, "INFO: Registrirajte se i uredite svoje papire.");
new regstring[128];
new regname[64];
GetPlayerName(playerid,regname,sizeof(regname));
format(regstring,sizeof(regstring),"Dobro dosli, %s\nTaj nadimak nije registiran.\nRegistriraj se:",regname);
ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Registriraj","Izlaz");
}
SetPlayerCameraPos(playerid, 1890.1014,-1194.7969,25.8091);
SetPlayerCameraLookAt(playerid, 1933.4393,-1196.2479,18.8163);
//PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pModel] = Peds[classid][0];
SetPlayerTeamFromClass(playerid,classid);
}
else SpawnPlayer(playerid);
return false;

i ovo

  public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new sendername[MAX_PLAYER_NAME];
new string[128];
if(response)
{
if(dialogid == 12346 || dialogid == 12347)
{
   if(strlen(inputtext))
   {
new tmppass[64];
strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
Encrypt(tmppass);
OnPlayerLogin(playerid,tmppass);
}
else
{
new loginstring[128];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"KRIVA LOZINKA\nMolimo vas da unesete tocnu lozinku:",loginname);
ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Izlaz");
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
}
}
if(dialogid == 12345)
{
   if(strlen(inputtext))
   {
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s.ini", sendername);
new File: hFile = fopen(string, io_read);
if (hFile)
{
SendClientMessage(playerid, COLOR_YELLOW, "Taj nadimak je vec zauzet, uzmite drugi nadimak.");
fclose(hFile);
return 1;
}
new tmppass[64];
strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
Encrypt(tmppass);
OnPlayerRegister(playerid,tmppass);
}
else
{
new regstring[128];
new regname[64];
GetPlayerName(playerid,regname,sizeof(regname));
format(regstring,sizeof(regstring),"Dobro dosli, %s\nTaj nadimak nije registriran.\nRegistriraj se:",regname);
ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Registriraj","Izlaz");
}
}
}
else
{
Kick(playerid);
}
return 1;
}


i izbaci mi slijdece errore

C:\Documents and Settings\Leo2\Desktop\Loginregister.pwn(75) : error 017: undefined symbol "gPlayerAccount"
C:\Documents and Settings\Leo2\Desktop\Loginregister.pwn(75) : warning 215: expression has no effect
C:\Documents and Settings\Leo2\Desktop\Loginregister.pwn(75) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Leo2\Desktop\Loginregister.pwn(75) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Leo2\Desktop\Loginregister.pwn(75) : fatal error 107: too many error messages on one line


A linija "75" je

if (gPlayerAccount[playerid] != 0)


Moze pomoc zasto se to dogaÄ'a 

UNAPRIJED HVALA!!!
Poslednja Izmena: Mart 08, 2010, 17:34:39 POSLE PODNE od L3O RUL3

Citat: L3O RUL3 poslato Mart 08, 2010, 17:33:19 POSLE PODNE
A linija "75" je

if (gPlayerAccount[playerid] != 0)


Probaj ovako:

if(!gPlayerAccount[playerid] == 0)

Nisam siguran dal ce radit, moglo bi ::)
Aequam memento rebus in arduis servare mentem.

Nece isti errori neprepoznaje ovo gPlayerAccount

prije nego naucite skriptati, naucite engleski jezik  >:(
ovo i onaj koji nikad nije skriptao,a zna engleski jezik - znao bi u cemu je problem.

Hint:
error 017: undefined symbol "gPlayerAccount"

Citat: JoeBullet v2.1 poslato Mart 08, 2010, 18:02:44 POSLE PODNE
prije nego naucite skriptati, naucite engleski jezik  >:(
ovo i onaj koji nikad nije skriptao,a zna engleski jezik - znao bi u cemu je problem.

Hint:
error 017: undefined symbol "gPlayerAccount"

ma sve je to u redu ali kako da ja napravim da ga prepoznaje XXDD nije problem u tome jel znam sto to znaci

Citat: JoeBullet v2.1 poslato Mart 08, 2010, 18:02:44 POSLE PODNE
prije nego naucite skriptati, naucite engleski jezik  >:(
ovo i onaj koji nikad nije skriptao,a zna engleski jezik - znao bi u cemu je problem.

Hint:
error 017: undefined symbol "gPlayerAccount"
Bravo Joe ;)
Now on CroHerza Roleplay/DM.

Nikad zaboravit: rk01, Capone, GooD, WixxeR, ShoX, Trmka, Leon, putic, Suki,Dane,  eRasmos, EMIR,Dupi, LUksa, Max, Amina, Jovana,Don Corleone,  Shooter..

Ludi Grad <3...

Nekad Ludi Grad Head Admin..

RazoR aka Razor_Sky aka RazoRSkY aka DestinY aka MoneY aha The Game aka Laquilla....

Pa mozda si negdje pogrijesio u pisanju, ako je "gPlayerAccount" moguce je da si negdje slucajno dodao slovo, npr.: "gPlayerAccountt" il slicno, pogledaj to