Szerző Téma: count  (Megtekintve 473 alkalommal)

Nem elérhető inf

  • 366
    • Profil megtekintése
count
« Dátum: 2014. Február 07. - 16:35:13 »
+1 Show voters
Sziasztok!
Ezzel mi a probléma?
Hiba:
 
error 035: argument type mismatch (argument 2)

 
Sor:
 
GameTextForPlayer(playerid,vcount,3000,4);

 
Teljes script:
 
public timercount(playerid)
{
new vcount = 60;
GameTextForPlayer(playerid,vcount,3000,4);
vcount--;
return 1;
}

Nem elérhető Dfoglalo

  • 4069
  • Globális Moderátor
    • Profil megtekintése
count
« Válasz #1 Dátum: 2014. Február 07. - 16:47:24 »
0 Show voters
 GameTextForPlayer(playerid,vcount,3000,4);

 
A vcount helyére karakterlánc kéne, nem integer. Pl.:
 
new vcount = \"asd\";

 
vagy
 
 GameTextForPlayer(playerid,\"asd\",3000,4);

 
ugyanis a paraméterek:
 
(playerid, const string[], time, style)

Nem elérhető jana4

  • 5929
  • Ex Staff
    • Profil megtekintése
count
« Válasz #2 Dátum: 2014. Február 07. - 21:10:13 »
+1 Show voters
Karakterláncnak illik adni méretet is! ;)
 
new vcount[4] = \"asd\";

Nem elérhető Dfoglalo

  • 4069
  • Globális Moderátor
    • Profil megtekintése
count
« Válasz #3 Dátum: 2014. Február 07. - 22:26:16 »
0 Show voters
Idézetet írta: ScreaM date=1391803813\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"46351\" data-ipsquote-contentclass=\"forums_Topic
Karakterláncnak illik adni méretet is! ;)
 
new vcount[4] = \"asd\";

 

Õõõöm :unsure: Nem én voltam :rolleyes: :whistle:

Nem elérhető Pedró

  • 3341
  • 2014 © Az év Szkriptere
    • Profil megtekintése
count
« Válasz #4 Dátum: 2014. Február 08. - 15:37:32 »
0 Show voters
Annyi hülyeséget összehordtál Dfoglalo.. Meg is értem, hogy 1 hét alatt 100 hsz-ed összejött.. :)
 
Idézetet írta: InFIeL_HuN date=1391787313\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"46351\" data-ipsquote-contentclass=\"forums_Topic

public timercount(playerid)
{
new vcount = 60;
GameTextForPlayer(playerid,vcount,3000,4);
vcount--;
return 1;
}

 

->
GM/FS elejére:
new vcount;
Amikor a Countert elindítod:
vcount = 60;
 
public timercount(playerid)
{
        new str[32];
        if(vcount == 0) format(str, sizeof(str), \"GO GO GO\");
        else format(str, sizeof(str), \"%i\", vcount);
GameTextForAll(str,3000,4);
vcount--;
return 1;
}

 
++
KillTimer se ártana..
Amikor a SetTimer funkciót elindítod, mentsd a SetTimer értékét változóba..
 
timer = SetTimer(...);

 
és akkor


áá meguntam. Írok neked egy FS-t..
 
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
forward CountDown();
new countdown_count = -1;
new countdown_timer;
public CountDown() {
new str[32];
if(countdown_count > 0) format(str, sizeof(str), \"CountDown~n~%i\", countdown_count);
else str = \"CountDown~n~GO GO GO\";
GameTextForAll(str, 3000, 4);
countdown_count--;
if(countdown_count == 0) {
    countdown_count = -1;
    KillTimer(countdown_timer);
}
return 1;
}
CMD:countdown(playerid) {
if(countdown_count != -1) return SendClientMessage(playerid, 0xFF0000FF, \"Hiba, jelenleg már fut egy visszaszámláló!\");
countdown_count = 60;
CountDown(); //Egybõl induljon..
countdown_timer = SetTimer(\"CountDown\", 1000, true);
SendClientMessage(playerid, 0xFFFF00FF, \"Elindítottál egy visszaszámlálót!\");
return 1;
}

Nem elérhető Dfoglalo

  • 4069
  • Globális Moderátor
    • Profil megtekintése
count
« Válasz #5 Dátum: 2014. Február 08. - 15:46:54 »
0 Show voters
Egyáltalán nem írtam hülyeséget, ugyanis akárhogy is nézem, a GameTextForPlayer függvény 2. paramétere string, õ pedig integert adott meg. :)

Nem elérhető ZyZu.

  • Globális moderátor
  • 8939
  • my turbo diesel forum
  • Discord: ZyZu.
    • Profil megtekintése
count
« Válasz #6 Dátum: 2014. Február 08. - 15:50:21 »
0 Show voters
[gmod]Kiemelt téma van ilyen kisebb kérdésekért! A témát zárom és szépen írj oda mint a többi fórumozó![/gmod]

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal