Szerző Téma: GameTextForPlayer  (Megtekintve 616 alkalommal)

GameTextForPlayer
« Dátum: 2012. december 16. - 11:12:19 »
0 Show voters
Jó reggeltet! :D
Próbáltam írni egy olyat, hogy valaki valakinek game textet írhat, csak erroros, meg warninog,s de nem tudom miért :\'(
 
CMD:text(playerid, params[])
{
new id, txt[128], uzi;
if (sscanf(params, \"uz\", id, txt)) SendClientMessage(playerid, 0xFF0000AA, \"Használat: /text [id] [szöveg]\");
else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, \"Nincs ilyen játékos!\");
else if (txt == 0) SendClientMessage(playerid, 0xFF0000AA, \"Írj valami üzenetet!\");
else
{
format(uzi, sizeof(uzi), \"%s\", txt);
GameTextForPlayer(id, uzi);
}
return 1;
}

 

c:\\DOCUME~1\\Viktor\\Asztal\\GTAJ~1\\FILTER~1\\tomi.pwn(6) : error 033: array must be indexed (variable \"txt\")
c:\\DOCUME~1\\Viktor\\Asztal\\GTAJ~1\\FILTER~1\\tomi.pwn(9) : error 035: argument type mismatch (argument 1)
c:\\DOCUME~1\\Viktor\\Asztal\\GTAJ~1\\FILTER~1\\tomi.pwn(9) : error 035: argument type mismatch (argument 1)
c:\\DOCUME~1\\Viktor\\Asztal\\GTAJ~1\\FILTER~1\\tomi.pwn(10) : error 035: argument type mismatch (argument 2)
c:\\DOCUME~1\\Viktor\\Asztal\\GTAJ~1\\FILTER~1\\tomi.pwn(3) : warning 203: symbol is never used: \"uzi\"

Nem elérhető Casamiro

  • 1046
    • Profil megtekintése
GameTextForPlayer
« Válasz #1 Dátum: 2012. december 16. - 12:02:39 »
+1 Show voters
CMD:text(playerid, params[])
{
new id, txt[128];
if (sscanf(params, \"us[128]\", id, txt)) SendClientMessage(playerid, 0xFF0000AA, \"Használat: /text [id] [szöveg]\");
if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, \"Nincs ilyen játékos!\");
GameTextForPlayer(id, txt, 1500, 3);
return 1;
}

Nem elérhető Iceaac

  • 2187
    • Profil megtekintése
GameTextForPlayer
« Válasz #2 Dátum: 2012. december 16. - 12:22:51 »
+1 Show voters
Csak 2 paramétert adsz meg a 4 kötelezõbõl.
GameTextForPlayer(playerid, const string[], time, style)

GameTextForPlayer
« Válasz #3 Dátum: 2012. december 16. - 12:23:26 »
0 Show voters
Köszi :D :D

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal