Urgent Help
#1

Please Help me with this:

Код:
C:\Documents and Settings\Sam\Desktop\ServerD\filterscripts\bfxUDx2.pwn(456) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
C:\Documents and Settings\Sam\Desktop\ServerD\filterscripts\bfxUDx2.pwn(464) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Sam\Desktop\ServerD\filterscripts\bfxUDx2.pwn(504) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Sam\Desktop\ServerD\filterscripts\bfxUDx2.pwn(507) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Sam\Desktop\ServerD\filterscripts\bfxUDx2.pwn(510) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Sam\Desktop\ServerD\filterscripts\bfxUDx2.pwn(513) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Sam\Desktop\ServerD\filterscripts\bfxUDx2.pwn(573) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Sam\Desktop\ServerD\filterscripts\bfxUDx2.pwn(649) : warning 235: public function lacks forward declaration (symbol "OnPlayerInfoChange")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.

And someone told me it was this thingy:


Код:
/* STRTOK

strtok(const string[], &index)
{
	new length = strlen(string);
	while ((index < length) && (string[index] <= ' '))
	{
		index++;
	}

	new offset = index;
	new result[20];
	while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
	{
		result[index - offset] = string[index];
		index++;
	}
	result[index - offset] = EOS;
	return result;
}*/
Reply
#2

OnPlayerPrivMsg and OnPlayerInfoChange were taken out.
Reply
#3

any idea on how to fix ?
Reply
#4

can someone help me with this please ?
Reply
#5

the code you gave is just https://sampwiki.blast.hk/wiki/Strtok
That shouldn't throw any errors.

As for OnPlayerPrivMsg, you just have to create a command using onplayercommandtext section of your code.
If you are using dcmd, i just recently coded one for someone http://forum.sa-mp.com/index.php?top...0316#msg900316

For the OnPlayerInfoChange, I am guessing you can use OnPlayerStateChange.
Reply
#6

Код:
/* STRTOK

strtok(const string[], &index)
{
	new length = strlen(string);
	while ((index < length) && (string[index] <= ' '))
	{
		index++;
	}

	new offset = index;
	new result[20];
	while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
	{
		result[index - offset] = string[index];
		index++;
	}
	result[index - offset] = EOS;
	return result;
}*/
I am using BlackFOX's Buyable Car system [FS] , People keep telling me it is this code right here.
Reply
#7

It's not in affect if you have it commented out.. remove the /* and the */.. and to fix the errors change your array to a bigger one. IE: new result[20]; to new result[64];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)