[Help]/DO Command
#1

Well this is code :

Quote:

if(strcmp(cmd,"/do",true) == 0)
{
if(IsPlayerConnected(playerid))
{
new wtf[256];
if(!strlen(wtf)) return SendClientMessage(playerid,neka barva,".: Usage: /do [action] :.");
if(wtf >= 256) { return 0; }
new textstring[256],playername[256];
GetPlayerName(playerid,playername,sizeof(playernam e));
format(textstring,sizeof(textstring),"%s %s.",wtf,playername);
SendClientMessageToAll(neka barva,textstring);
return 1;
}
return 1;
}

And this is problem :
Quote:

C:\Documents and Settings\TEMP\Desktop\samp03asvr_R3_win32(2)\gamem odes\KDST2.pwn(11392) : error 033: array must be indexed (variable "wtf")
C:\Documents and Settings\TEMP\Desktop\samp03asvr_R3_win32(2)\gamem odes\KDST2.pwn(11393) : warning 219: local variable "playername" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Thanks everyone who will help :P
Reply
#2

pawn Код:
if(strlen(wtf) >= 256) { return 0; }
new textstring[256];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)