17.12.2010, 10:55
im trying to make my first gm and i type out my first command i want on it and i keep getting this error.
Код:
error 017: undefined symbol "cmd"
error 017: undefined symbol "cmd"
warning 219: local variable "cmd" shadows a variable at a preceding level
new cmd[128];
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd, "/info", true) == 0)
{
if(IsPlayerConnected(playerid))
{
{
SendClientMessage(playerid, WHITE, " World Wide RolePlay");
}
}
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext,"/info",true)) //you forgot the !strcmp, and use boulean true.
{
SendClientMessage(playerid, WHITE, " World Wide RolePlay");
}
return 0;
}
}