SA-MP Forums Archive
Urgent Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Urgent Help (/showthread.php?tid=123207)



Urgent Help - CharlieScene - 24.01.2010

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;
}*/



Re: Urgent Help - Backwardsman97 - 24.01.2010

OnPlayerPrivMsg and OnPlayerInfoChange were taken out.


Re: Urgent Help - CharlieScene - 25.01.2010

any idea on how to fix ?


Re: Urgent Help - CharlieScene - 05.02.2010

can someone help me with this please ?


Re: Urgent Help - mansonh - 05.02.2010

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.


Re: Urgent Help - CharlieScene - 05.02.2010

Код:
/* 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.


Re: Urgent Help - Devine - 06.02.2010

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];