Register problem
#1

I made a Register panel, but it keeps giving me weird warnings, I did open users folder, and I downloaded a Dini file random one. (This script was put under (
PHP код:
public OnPlayerConnect(playerid
)
{
PHP код:
Line 223 GetPlayerName(playerid,playername,sizeof(playername));
format(pfile,sizeof(pfile),"Users/%s.ini",playername);
if(
dini_Exists(pfile)){
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Register","Type your password here:","Register","Cancel");
}
 
else (
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login","Type your password here:","Login","Cancel");)
}
if(
dialogid == 2){
if(
response){
if(
20 strlen(inputtext) || strlen(inputtext) < 5){
SendClientMessage(playerid,0xAA3333AA,"Short password, has to be upto 5-20 characters !");
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login","Type your password here :","Login","Cancel");}
else {
if(!
strcmp(inputtext,dini_Get(pfile,"Password"),true)) {
dini_Get(pfile,"BlaBla");
dini_Get(pfile,"BlaBla1");
dini_Get(pfile,"BlaBla2");
dini_Get(pfile,"BlaBla3");
dini_Get(pfile,"BlaBla4");
dini_Get(pfile,"BlaBla5");
dini_Get(pfile,"BlaBla6");
dini_Get(pfile,"BlaBla7");
dini_Get(pfile,"BlaBla8l");
dini_Get(pfile,"BlaBla9");
GetPlayerName(playeridplayernamesizeof(playername));
else {
SendClientMessage(playerid0xAA3333AA"Wrong password !");
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login","Type your password here :","Login","Cancel");}
}
}
else {
Kick(playerid);
}
return 
1;

Warnings :
PHP код:
C:\Documents and Settings\\My Documents\Downloads\samp03bsvr_R2_win32\gamemodes\RP.pwn(223) : error 017undefined symbol "playername"
C:\Documents and Settings\\My Documents\Downloads\samp03bsvr_R2_win32\gamemodes\RP.pwn(223) : error 017undefined symbol "playername"
C:\Documents and Settings\\My Documents\Downloads\samp03bsvr_R2_win32\gamemodes\RP.pwn(223) : error 029invalid expressionassumed zero
C
:\Documents and Settings\My Documents\Downloads\samp03bsvr_R2_win32\gamemodes\RP.pwn(223) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Can any one help me ?
Reply
#2

Did you remember?:
pawn Код:
new playername[MAX_PLAYER_NAME];
Reply
#3

Above, lays your answer.
Reply
#4

PHP код:
modes\RP.pwn(239) : error 017undefined symbol "pfile"
C:\Documents and Settings\\My Documents\Downloads\samp03bsvr_R2_win32\gamemodes\RP.pwn(239) : error 017undefined symbol "pfile"
C:\Documents and Settings\\My Documents\Downloads\samp03bsvr_R2_win32\gamemodes\RP.pwn(239) : error 029invalid expressionassumed zero
C
:\Documents and Settings\\My Documents\Downloads\samp03bsvr_R2_win32\gamemodes\RP.pwn(239) : fatal error 107too many error messages on one line 
What now ?
This is the script :
PHP код:
GetPlayerName(playerid,playername,sizeof(playername));
Line 239 format(pfile,sizeof(pfile),"Users/%s.ini",playername);
if(
dini_Exists(pfile)){
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Register","Type your password here:","Register","Cancel");
}
 
else (
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login","Type your password here:","Login","Cancel");)
}
if(
dialogid == 2){
if(
response){
if(
20 strlen(inputtext) || strlen(inputtext) < 5){
SendClientMessage(playerid,0xAA3333AA,"Short password, has to be upto 5-20 characters !");
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login","Type your password here :","Login","Cancel");}
else {
if(!
strcmp(inputtext,dini_Get(pfile,"Password"),true)) {
dini_Get(pfile,"BlaBla");
dini_Get(pfile,"BlaBla1");
dini_Get(pfile,"BlaBla2");
dini_Get(pfile,"BlaBla3");
dini_Get(pfile,"BlaBla4");
dini_Get(pfile,"BlaBla5");
dini_Get(pfile,"BlaBla6");
dini_Get(pfile,"BlaBla7");
dini_Get(pfile,"BlaBla8l");
dini_Get(pfile,"BlaBla9");
GetPlayerName(playeridplayernamesizeof(playername));
else {
SendClientMessage(playerid0xAA3333AA"Wrong password !");
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login","Type your password here :","Login","Cancel");}
}
}
else {
Kick(playerid);
}
return 
1;

Reply
#5

Quote:
Originally Posted by Scriptissue
Посмотреть сообщение
PHP код:
modes\RP.pwn(239) : error 017undefined symbol "pfile"
C:\Documents and Settings\\My Documents\Downloads\samp03bsvr_R2_win32\gamemodes\RP.pwn(239) : error 017undefined symbol "pfile"
C:\Documents and Settings\\My Documents\Downloads\samp03bsvr_R2_win32\gamemodes\RP.pwn(239) : error 029invalid expressionassumed zero
C
:\Documents and Settings\\My Documents\Downloads\samp03bsvr_R2_win32\gamemodes\RP.pwn(239) : fatal error 107too many error messages on one line 
What now ?
This is the script :
PHP код:
GetPlayerName(playerid,playername,sizeof(playername));
Line 239 format(pfile,sizeof(pfile),"Users/%s.ini",playername);
if(
dini_Exists(pfile)){
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Register","Type your password here:","Register","Cancel");
}
 
else (
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login","Type your password here:","Login","Cancel");)
}
if(
dialogid == 2){
if(
response){
if(
20 strlen(inputtext) || strlen(inputtext) < 5){
SendClientMessage(playerid,0xAA3333AA,"Short password, has to be upto 5-20 characters !");
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login","Type your password here :","Login","Cancel");}
else {
if(!
strcmp(inputtext,dini_Get(pfile,"Password"),true)) {
dini_Get(pfile,"BlaBla");
dini_Get(pfile,"BlaBla1");
dini_Get(pfile,"BlaBla2");
dini_Get(pfile,"BlaBla3");
dini_Get(pfile,"BlaBla4");
dini_Get(pfile,"BlaBla5");
dini_Get(pfile,"BlaBla6");
dini_Get(pfile,"BlaBla7");
dini_Get(pfile,"BlaBla8l");
dini_Get(pfile,"BlaBla9");
GetPlayerName(playeridplayernamesizeof(playername));
else {
SendClientMessage(playerid0xAA3333AA"Wrong password !");
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login","Type your password here :","Login","Cancel");}
}
}
else {
Kick(playerid);
}
return 
1;

pawn Код:
new pFile;
Also, this is not PHP code. Use the tags below.
Код:
[pawn*] [*/pawn]
Without the *
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)