Jump to content
  • 0

problema email mysql


WiDuAlK

4 answers to this question

Recommended Posts

Inlocuieste

 

[pawn]format( gQuery, sizeof gQuery, "UPDATE `Users` SET `Mail`='%s' WHERE `Name`='%s'", Security, GetName( playerid ) ) ;[/pawn]

 

cu

 

[pawn]format( gQuery, sizeof gQuery, "UPDATE `Users` SET `Mail`='%e' WHERE `Name`='%s'", strval( inputtext ), GetName( playerid ) ) ;[/pawn]

 

Inlocuieste peste tot in EMAIL_DIALOG variabila pEmail cu strval( inputtext ).

 

Sterge

 

[pawn]new pEmail[ 55 ] ;
new Security[ 55 ];
mysql_escape_string( pEmail, Security ) ;[/pawn]

 

De ce?

 

Ai sters acele variabile pentru ca nu aveai nevoie de ele.

 

pEmail - o sa fie goala mareu pentru ca nu ai pus sa ii copieze valoarea lui inputtext.

Security[ 55 ] si mysql_escape_string( pEmail, Security ) ; - nu ai nevoie de ele pentru ca daca pui "%e" deja ii face escape string.

Link to comment
Share on other sites

ok deci

[pawn]case EMAIL_DIALOG:
{
gQuery[ 0 ] = EOS;
gString[ 0 ] = EOS ;

if ( !response )
return ShowPlayerDialog( playerid, EMAIL_DIALOG, DIALOG_STYLE_INPUT, "{FFF1AF}2. {FFFFFF}Mail", gString, "Register", "" ) ;

if ( sscanf( inputtext, "s[55]", strval( inputtext )) )
return ShowPlayerDialog( playerid, EMAIL_DIALOG, DIALOG_STYLE_INPUT, "{FFF1AF}2. {FFFFFF}Mail", gString, "Register", "" ) ;

if ( strlen( inputtext ) < 6 || strlen( inputtext ) > 55 )
return ShowPlayerDialog( playerid, EMAIL_DIALOG, DIALOG_STYLE_INPUT, "{FFF1AF}2. {FFFFFF}Mail", gString, "Register", "" ) ;

if ( strfind( inputtext ), "@", false ) == -1 || strfind( inputtext ), ".", false ) == -1 )
return ShowPlayerDialog( playerid, EMAIL_DIALOG, DIALOG_STYLE_INPUT, "{FFF1AF}2. {FFFFFF}Mail", gString, "Register", "" ) ;

format( gQuery, sizeof gQuery, "UPDATE `Users` SET `Mail`='%e' WHERE `Name`='%s'", strval( inputtext ), GetName( playerid ) ) ;
mysql_tquery(aHandle, gQuery, "", "");

SendClientMessage( playerid, -1, "Mail-ul tau a fost inserat in baza de date !" ) ;

format( PlayerInfo[ playerid ][ Mail ], 55, "%s", inputtext );

[pawn] if ( strfind( inputtext ), "@", false ) == -1 || strfind( inputtext ), ".", false ) == -1 )[/pawn]
SpawnPlayer(playerid);
ShowPlayerDialog( playerid, D_NONE, DIALOG_STYLE_MSGBOX, "Felicitari", "Te-ai inregistrat!", "(Select)", "" ) ;
}[/pawn]

si niste erori:

G.M.pwn(287) : warning 202: number of arguments does not match definition
G.M.pwn(287) : warning 205: redundant code: constant expression is zero
G.M.pwn(287) : error 029: invalid expression, assumed zero
G.M.pwn(287) : error 029: invalid expression, assumed zero
G.M.pwn(287) : error 029: invalid expression, assumed zero
G.M.pwn(287) : fatal error 107: too many error messages on one line
adica:
[pawn] if ( strfind( inputtext ), "@", false ) == -1 || strfind( inputtext ), ".", false ) == -1 )[/pawn]
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.