report
#1

Hi,

Im trying to add a report script to the orc echo script i use but its an ingame command just echoes the report on irc aswell but i get errors

Код:
	if (strcmp("/report", command, true, 7) == 0)
	{
    if(IsPlayerConnected(playerid))
    {
	    new string[256], sendername[MAX_PLAYER_NAME];
      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, 0xFFFFFFAA, "USAGE: /report <playerid> <reason>");
		   return 1;
      }
		  format(string, sizeof(string), "Report from %s(%d): %s", sendername, playerid, result);
		  SendAdminMessage( 0xFF4646FF, string);
		  format(string, sizeof(string), "6Report from %s(%d): %s", sendername, playerid, result);
   ircSay(EchoConnection, AdminChan, string);
		  format(string, sizeof(string), "[Report] %s(%d) %s", sendername, playerid, result);
		  add_log(string);
		  SendClientMessage(playerid, 0xFF9900AA, "Report sent to currently online admins.");
		}
		return 1;
	}
Quote:

C:\Users\Admin\Desktop\New Folder (4)\f\ech.pwn(1219) : warning 215: expression has no effect
C:\Users\~\Desktop\New Folder (4)\f\ech.pwn(1221) : warning 217: loose indentation
C:\Users\~\Desktop\New Folder (4)\f\ech.pwn(1221) : error 029: invalid expression, assumed zero
C:\Users\~\Desktop\New Folder (4)\f\ech.pwn(1221) : warning 215: expression has no effect
C:\Users\~\Desktop\New Folder (4)\f\ech.pwn(1221) : error 001: expected token: ";", but found ")"
C:\Users\~\Desktop\New Folder (4)\f\ech.pwn(1221) : error 029: invalid expression, assumed zero
C:\Users\~\Desktop\New Folder (4)\f\ech.pwn(1221) : fatal error 107: too many error messages on one line

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


4 Errors.

I have no idea what im doing lol but i'v been messing around for the last 3 hours and nothing

http://pastebin.com/m160612ad
Reply


Messages In This Thread
report - by StingeR - 03.03.2009, 18:22
Re: report - by Schock - 03.03.2009, 18:46
Re: report - by StingeR - 04.03.2009, 14:42

Forum Jump:


Users browsing this thread: 2 Guest(s)