[POMOC]Testo[playerid] = 1;

Započeo Belajac, Mart 04, 2013, 20:39:25 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: CLRP
Detaljan opis problema:
E:\SAMP\TC V5.5 LV\gamemodes\TC.pwn(29072) : error 028: invalid subscript (not an array or too many subscripts): "Testo"
E:\SAMP\TC V5.5 LV\gamemodes\TC.pwn(29072) : warning 215: expression has no effect
E:\SAMP\TC V5.5 LV\gamemodes\TC.pwn(29072) : error 001: expected token: ";", but found "]"
E:\SAMP\TC V5.5 LV\gamemodes\TC.pwn(29072) : error 029: invalid expression, assumed zero
E:\SAMP\TC V5.5 LV\gamemodes\TC.pwn(29072) : fatal error 107: too many error messages on one line

Deo skripte:

new Testo;
CMD:testo(playerid, params[])
    {
   Testo[playerid] = 1;
}
29072 if(Testo[playerid] == 1)
{
SendClientMessage(playerid,COLOR_WHITE,"aaa");
}
Poslednja Izmena: Mart 04, 2013, 20:40:55 POSLE PODNE od Belajac

new Testo;
CMD:testo(playerid, params[])
{
if(Testo[playerid] == 0)
{
Testo[playerid] = 1;
}
if(Testo[playerid] == 1)
{
SendClientMessage(playerid,COLOR_WHITE,"aaa");
}
return 1;
}
Poslednja Izmena: Mart 04, 2013, 20:45:54 POSLE PODNE od Dimi

Ako mislis koristit dalje u modu array (niz), sto izgleda ovak:
Testo[playerid] = 1; // Znaci da ima nesto u uglatim zagradama poslije imena varijable

Onda pri njezinom definiranju moras odredit velicinu tog arraya (niza):
new Testo[MAX_PLAYERS]; // Kad deiniras neki array za igraca onda uvijek ide MAX_PLAYERS pri definiranju u uglate zagrade

Last nick: Paradox

Ja sam otprilike ovo stavio, ali evo preciznije:
new Testo;
CMD:testo(playerid, params[])
    {
   Testo[playerid] = 1;
ShowPlayerDialog(playerid,PITANJE1,DIALOG_STYLE_MSGBOX,"Da li zelite hleb?","Da","Ne");
}
if(dialogid == PITANJE1)
{
29072 if(Testo[playerid] == 1)
{
if(response)
{
SendClientMessage(playerid,COLOR_WHITE,"aaa");
}
}
}

Ponavljam, moras pri definiranju stavit:
new Testo[MAX_PLAYERS];

Last nick: Paradox


Nemas frke. :)

Rijesen problem, lock.

Last nick: Paradox