Pomoc

Započeo bendzamin4674, Oktobar 13, 2024, 16:31:21 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Pravio sam sistem zadataka za skriptu i uspeo sam sve da napravim to,ali kada zavrsi zadatak i dobije novac na phpmyadmin umesto imena ono ispise %e https://imgur.com/a/OJRpHBR
Kod: https://pastebin.com/Rt2uxdwK




Citat: twoblqck.art poslato Oktobar 13, 2024, 17:54:23 POSLE PODNEStavi pod " "
new rows;
    cache_get_row_count(rows);
    if(!rows) mysql_tquery(_dbConnector, "INSERT INTO `tutorial` (`ime`) VALUES "%s"", GetName(playerid));
    mysql_format(_dbConnector, "UPDATE `tutorial` SET `tut_Done%d` = '1' WHERE `ime` = "%s" LIMIT 1", broj-1, GetName(playerid) ); ovako ili(ne razumem se najbolje halali)

Citat: bendzamin4674 poslato Oktobar 13, 2024, 18:08:54 POSLE PODNEnew rows;
    cache_get_row_count(rows);
    if(!rows) mysql_tquery(_dbConnector, "INSERT INTO `tutorial` (`ime`) VALUES "%s"", GetName(playerid));
    mysql_format(_dbConnector, "UPDATE `tutorial` SET `tut_Done%d` = '1' WHERE `ime` = "%s" LIMIT 1", broj-1, GetName(playerid) ); ovako ili(ne razumem se najbolje halali)

new query[256];
new rows;
cache_get_row_count(rows);
if(!rows) mysql_tquery(_dbConnector, query, sizeof(query), "INSERT INTO `tutorial` (`ime`) VALUES ('%e')", GetName(playerid));
mysql_format(_dbConnector, query, sizeof(query), "UPDATE `tutorial` SET `tut_Done%d` = '1' WHERE `ime` = "%e" LIMIT 1", broj-1, GetName(playerid) );
Pokušaj ovako

moja greska, glup sam

    new query[128];

    if(!rows)
    {
        mysql_format(_dbConnector, query, sizeof(query), "INSERT INTO `tutorial` (`ime`) VALUES ('%e')", GetName(playerid));
        mysql_tquery(_dbConnector, query);
    }
    mysql_format(_dbConnector, query, sizeof(query), "UPDATE `tutorial` SET `tut_Done%d` = '1' WHERE `ime` = '%e' LIMIT 1", broj-1, GetName(playerid));
    mysql_tquery(_dbConnector, query);

probaj ovako
Poslednja Izmena: Oktobar 13, 2024, 18:39:05 POSLE PODNE od twoblqck.art

Citat: twoblqck.art poslato Oktobar 13, 2024, 18:35:05 POSLE PODNEmoja greska, glup sam

    new query[128];

    if(!rows)
    {
        mysql_format(_dbConnector, query, sizeof(query), "INSERT INTO `tutorial` (`ime`) VALUES ('%e')", GetName(playerid));
        mysql_tquery(_dbConnector, query);
    }
    mysql_format(_dbConnector, query, sizeof(query), "UPDATE `tutorial` SET `tut_Done%d` = '1' WHERE `ime` = '%e' LIMIT 1", broj-1, GetName(playerid));
    mysql_tquery(_dbConnector, query);

probaj ovako
hvala popravio sam,hvala svima koji su pomogli...

Greska ti je bila u VALUES

Kada insertujes nesto onda mora da bude

[pawn]mysql_format(SQL, string,sizeof(string), "INSERT INTO `zadatci` (`Username`) VALUES ('%s')", GetName(playerid));[/pawn]