Warnings and script don't work
#1

Hello, before the thread sorry for my bad english but i try my best

So I made my first system to command /me, i saw some in the Internet but i decide to do my own, but I can't put it working, when I try /me the server says " Unknown Command" btw the /me is local, if someone could help me with the warnings and put this working I would apreciate

So here it goes the code:

Код:
public OnPlayerCommandText(playerid, cmdtext[])

if(IsPlayerConnected(playerid))
{
		new Float: radi, Float: str;
        new Float:posx, Float:posy, Float:posz;
        new Float:oldposx, Float:oldposy, Float:oldposz;
        new Float:tempposx, Float:tempposy, Float:tempposz;
        for(new i = 0; i < MAX_PLAYERS; i++)

	    if(IsPlayerConnected(i))
{
                GetPlayerPos(i, posx, posy, posz);
                tempposx = (oldposx -posx);
                tempposy = (oldposy -posy);
                tempposz = (oldposz -posz);



   if (!strcmp(cmdtext, "/me", true, 3))
    {
        if(!cmdtext[3])return SendClientMessage(playerid, vermelho, "Usa: /me [Aзгo]"); // Usa: /me Aзгo = [EN] Use: /me Action
        new str[128];
        GetPlayerName(playerid, str, sizeof(str));
        format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
        if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
        SendClientMessage(i, roxo, "str");
	}
	 
	 {
        
        return 0;
}
    return 0;
}
}
The Warnings are:

Quote:

C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(41) : warning 217: loose indentation
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(44) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(51) : warning 217: loose indentation
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(55) : warning 225: unreachable code
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(55) : warning 217: loose indentation
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(26) : warning 203: symbol is never used: "str"
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(26 -- 61) : warning 209: function "OnPlayerCommandText" should return a value
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


7 Warnings.

Sorry if the system is too bad, but I'm a newbie in pawno, and I'm trying hard
Reply


Messages In This Thread
Warnings and script don't work - by MacacoDoArtico - 13.08.2014, 00:35
Re: Warnings and script don't work - by Dignity - 13.08.2014, 00:42
Re: Warnings and script don't work - by MacacoDoArtico - 13.08.2014, 00:54
Re: Warnings and script don't work - by Stinged - 13.08.2014, 01:16
Re: Warnings and script don't work - by Dignity - 13.08.2014, 01:28
Re: Warnings and script don't work - by MacacoDoArtico - 13.08.2014, 01:41
Re: Warnings and script don't work - by MacacoDoArtico - 13.08.2014, 02:04
Re: Warnings and script don't work - by MacacoDoArtico - 13.08.2014, 02:58
Re: Warnings and script don't work - by Dignity - 13.08.2014, 03:02
Re: Warnings and script don't work - by MacacoDoArtico - 13.08.2014, 03:48

Forum Jump:


Users browsing this thread: 2 Guest(s)