SA-MP Forums Archive
It doesen't work - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: It doesen't work (/showthread.php?tid=414621)



It doesen't work - kaloqn54 - 10.02.2013

Код:
CMD:checkdrugs(playerid, params[])
{
	new string[100];
	new string2[100];
75	Heroin[playerid];
76	Weed[playerid];
    format(string, sizeof(string), "Имаш %s Хероин", Heroin[playerid]);
    format(string2, sizeof(string2), "Имаш %s Трева", Weed[playerid]);
    SendClientMessage(playerid, -1, string);
    SendClientMessage(playerid, -1, string2);
    return 1;
}
i am typing /checkdrugs and when i type it doesn't show a number Help

it says You have Weed


Re: It doesen't work - kaloqn54 - 10.02.2013

D:\igri\GTA-SanAndreas\pawno\Untitled.pwn(75) : warning 215: expression has no effect
D:\igri\GTA-SanAndreas\pawno\Untitled.pwn(76) : warning 215: expression has no effect

Theese are

Heroin[playerid]; and Weed[playerid];


Re: It doesen't work - RajatPawar - 10.02.2013

What the heck is
pawn Код:
75 Heroin[MAX_PLAYERS];



Re: It doesen't work - kaloqn54 - 10.02.2013

to show you were is the error


Re: It doesen't work - RajatPawar - 10.02.2013

pawn Код:
CMD:checkdrugs(playerid)
{
    new string[70];
    format(string, sizeof(string), "Имаш %s Хероин", Heroin[playerid]);
    SendClientMessage(playerid, -1, string);
   format(string, sizeof(string), "Имаш %s Трева", Weed[playerid]);
    SendClientMessage(playerid, -1, string);
    return 1;
}
I think you already have declared Heroin as a var, so no need to declare it once more. If you haven't, add:
pawn Код:
new Heroin[MAX_PLAYERS],
      Weed[MAX_PLAYERS];
on the top, or wherever you need it.