What Am I doing wrong?
#8

Quote:
Originally Posted by [B2K
Hustler ]
double post!

Depends on how most your commands are. If most of your commands are like this:
i.e. it has new string somewhere in the command...
pawn Код:
if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me
    {
      if(!cmdtext[3]) return SendClientMessage(playerid, 0xFF0000FF, "USAGE/UŻYCIE: /me [action/akcja]");
      new string[128], name[16]; // new "string" here!!!
      GetPlayerName(playerid, name, sizeof(name));
      format(string, 128, "*** %s %s", name, cmdtext[4]);
      SendClientMessageToAll(COLOR_LIGHTGREEN, string);
      return 1;
    }
..then remove the new string under OnPlayerCommandText.

If not, then delete new string from that command. The error message is saying that you have two strings named "string" at the same time.
I did that, the warning is gone, but there is a problem in game, as those commands I have made are not shown to everyone. They are only shown to the person that types them. I have tried writing SendClientMessageToAll instead of SendClientMessage but this is what i get:

Код:
C:\DOCUME~1\KAMIL\Pulpit\RPGTDM~1\RPG.pwn(1946) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply


Messages In This Thread
What Am I doing wrong? - by Puzi - 30.05.2009, 13:45
Re: What Am I doing wrong? - by Think - 30.05.2009, 13:48
Re: What Am I doing wrong? - by Puzi - 30.05.2009, 13:49
Re: What Am I doing wrong? - by Think - 30.05.2009, 13:50
Re: What Am I doing wrong? - by Puzi - 30.05.2009, 13:53
Re: What Am I doing wrong? - by Puzi - 30.05.2009, 14:03
Re: What Am I doing wrong? - by member - 30.05.2009, 14:07
Re: What Am I doing wrong? - by Puzi - 30.05.2009, 14:34
Re: What Am I doing wrong? - by Puzi - 30.05.2009, 14:47

Forum Jump:


Users browsing this thread: 1 Guest(s)