[HELP] /editcardescription
#1

I need help with this code,it gives me an error when i compile it.

Код:
   if(strcmp(cmd, "/editcardes", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
		{
			if(PlayerInfo[playerid][pAdmin] < 4)
			{
				SendClientMessage(playerid, COLOR_GRAD2, "  You are not an Admin !");
				return 1;
			}

				if(IsAnOwnableCar(idcar))
				{
				
		  		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, "USAGE: /osay TEXT");
						return 1;
					}
			
					CarInfo[idcar][cDescription] = result;
    			format(string, sizeof(string), "Vehicle id %s's price changed to %d",idcar,CarInfo[idcar][cValue],result);
					SendClientMessage(playerid, COLOR_GRAD2, string);

					OnPropUpdate();
				}



		}
		return 1;
	}
C:\Documents and Settings\аеш рчщ\щемзп дтбегд\оег згщ\Script\roleplay.pwn(21695) : error 047: array sizes do not match, or destination array is too small

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

I have tried to change the result to 256,but that didn't work.
Reply


Messages In This Thread
[HELP] /editcardescription - by Nakash - 29.11.2009, 08:33
Re: [HELP] /editcardescription - by diesulke - 29.11.2009, 09:32
Re: [HELP] /editcardescription - by Nakash - 29.11.2009, 09:51
Re: [HELP] /editcardescription - by Nakash - 29.11.2009, 15:06
Re: [HELP] /editcardescription - by Joe Staff - 29.11.2009, 15:14

Forum Jump:


Users browsing this thread: 2 Guest(s)