MySQL query first letter
#1

Hey,

My MySQL Script just repeats the first Letters.

This is the Output

Код:
UPDATE users SET geburtstag = '1', vorname = 'S', nachname = 'G' , geschlecht = '0' WHERE id = '6'
The Code is

Код:
	mysql_format(handle, query, sizeof(query), "UPDATE users SET geburtstag = '%e', vorname = '%e', nachname = '%e' , geschlecht = '%d' WHERE id = '%d'",
	PlayerInfo[playerid][pGeburtstag], PlayerInfo[playerid][pVorname],PlayerInfo[playerid][pNachname],PlayerInfo[playerid][pGeschlecht], PlayerInfo[playerid][p_id]);
The Enum is


Код:
pVorname[128],
	pNachname[128],
	pGeburtstag[20],

The pVorname gets read in OnDialogResponse

Code:

Код:
	strcpy(Vorname[playerid], inputtext, 128);
	if(strlen(inputtext) < 3) return SendClientMessage(playerid,-1,"Dein Vorname muss mindestens 3 Buchstaben enthalten!");
	format(string,sizeof(string),"Dein Vorname ist nun %s", Vorname[playerid]);
	SendClientMessage(playerid,-1,string);
	PlayerTextDrawSetString(playerid,RegisterPTD[playerid][1],Vorname[playerid]);
	SelectTextDraw(playerid, 0xFFFFFFFF);
	PlayerInfo[playerid][pVorname]  = Vorname[playerid];
Reply
#2

Can you print your variables alone, to see, if there is really more than one char?
Reply
#3

pawn Код:
PlayerInfo[playerid][pVorname]  = Vorname[playerid];
Do not copy strings directly. Use strcpy instead.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)