Trouble with 2 commands
#1

Код:
C:\Documents and Settings\***\Desktop\ser\gamemodes\Test\pzwt.pwn(572) : error 017: undefined symbol "cmd"
C:\Documents and Settings\***\Desktop\ser\gamemodes\Test\pzwt.pwn(581) : error 017: undefined symbol "sendername"
C:\Documents and Settings\***\Desktop\ser\gamemodes\Test\pzwt.pwn(581) : error 017: undefined symbol "sendername"
C:\Documents and Settings\***\Desktop\ser\gamemodes\Test\pzwt.pwn(581) : error 029: invalid expression, assumed zero
C:\Documents and Settings\***\Desktop\ser\gamemodes\Test\.pwn(581) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Dodane Linijki:

Код:
//----------------------------------[Emote]-----------------------------------------------
	if(strcmp(cmd, "/ja", true) == 0 || strcmp(cmd, "/me", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	       /* if(gPlayerLogged[playerid] == 0)
	        {
	            SendClientMessage(playerid, COLOR_GREY, "   Nie jesteś zalogowany !");
	            return 1;
	        }*/
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "Użyj: /ja [akcja]");
				return 1;
			}
			format(string, sizeof(string), "* %s %s", sendername, result);
			ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			printf("%s", string);
		}
		return 1;
	}
//----------------------------------[Emote]-----------------------------------------------
	if(strcmp(cmd, "/do", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        /*if(gPlayerLogged[playerid] == 0)
	        {
	            SendClientMessage(playerid, COLOR_GREY, "   Nie jesteś zalogowany !");
	            return 1;
	        }*/
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "Użyj: /do [akcja]");
				return 1;
			}
			format(string, sizeof(string), "* %s ((%s))", result, sendername);
			ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			printf("%s", string);
		}
		return 1;
	}
Reply


Messages In This Thread
Trouble with 2 commands - by BosteQ - 18.03.2012, 12:02
Re: Trouble with 2 commands - by James Coral - 18.03.2012, 12:04
Re: Trouble with 2 commands - by BosteQ - 18.03.2012, 13:57
Re: Trouble with 2 commands - by James Coral - 18.03.2012, 14:41
Re: Trouble with 2 commands - by BosteQ - 18.03.2012, 15:02

Forum Jump:


Users browsing this thread: 1 Guest(s)