Help 2 eroras need very HELP
#1

C:\Documents and Settings\skaidrox\Desktop\manokurtas\gamemodes\man o.pwn(480) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\skaidrox\Desktop\manokurtas\gamemodes\man o.pwn(483) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

Got 2 erors

480 line is
Код:
tmp = strtok(params, index);
483 line is
Код:
	tmp2 = strtok(params, index);

This is all code

Код:
dcmd_password(playerid, params[])
	{
    if(gPlayerInfo[playerid][PLAYER_REGGED] != 1)
	return SendClientMessage(playerid, ORANGE, "ERROR: You must register first to do that! Use /register [password] to register and login.");
    else if(gPlayerInfo[playerid][PLAYER_LOGGED] == 0)
	return SendClientMessage(playerid, ORANGE, "ERROR: You must be logged-in to do that! Use /login [password] to login.");
    else
    {
	new tmp[30],
	tmp2[30],
	index;
	tmp = strtok(params, index);
	if(!strlen(tmp))
 	return SendClientMessage(playerid, ORANGE, "USAGE: /password [password] [new password]");
	tmp2 = strtok(params, index);
	if(!strlen(tmp2))
	return SendClientMessage(playerid, ORANGE, "USAGE: /password [password] [new password]");
	new oldpassword = num_hash(tmp), newpassword = num_hash(tmp2);
	if(gPlayerInfo[playerid][PLAYER_PASS] == oldpassword)
	{
	if(oldpassword == newpassword)
	return SendClientMessage(playerid, ORANGE, "ERROR: Your old password can not be the same as your new password.");
	else if(strlen(tmp2) < gSettings[PASS_MIN] || strlen(tmp2) > gSettings[PASS_MAX])
	{
	new string[100]; format(string, sizeof(string), "ERROR: Your new password must be between %d and %d characters long!", gSettings[PASS_MIN], gSettings[PASS_MAX]);
 	return SendClientMessage(playerid, ORANGE, string);
 	}
 	gPlayerInfo[playerid][PLAYER_PASS] = newpassword;
 	new string[128]; format(string, sizeof(string), "You have successfully changed your password from \'%s\' to \'%s\'.", tmp, tmp2);
 	return SendClientMessage(playerid, ORANGE, string);
	}
	else
 	return SendClientMessage(playerid, ORANGE, "ERROR: Incorrect password.");
    }
	}
Reply
#2

pawn Код:
new tmp[64],
    tmp2[64],
instead of

pawn Код:
new tmp[30],
    tmp2[30],
Reply
#3

Nothing same shit :/
Reply
#4

new tmp[256],
tmp2[256],

Working :]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)