SA-MP Forums Archive
Weird Bug. 0.3x (NPC OnClientMessage) - 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)
+--- Thread: Weird Bug. 0.3x (NPC OnClientMessage) (/showthread.php?tid=416490)



Weird Bug. 0.3x (NPC OnClientMessage) - iamkevin - 17.02.2013

I searched all over the SA-MP wiki and there was nothing concerning this.

Код:
public OnClientMessage(color, text[])
{

	if(text[0] != '/' || color != *****_Message_Color) return;
   
    if(strcmp(text, "/walk", true) == 0)
{
This is crashing the NPC. Even strfind crashes the npc. Is it a bug in the 0.3x sa-mp server version?

The crash is happening any time it calls strfind or strcmp in the OnClientMessage. (on npcmodes only)


Re: Weird Bug. 0.3x (NPC OnClientMessage) - iamkevin - 17.02.2013

I haven't slept for hours trying to figure out this error and trying to bypass it. There's no documentation on this anywhere on the internet.


Re: Weird Bug. 0.3x (NPC OnClientMessage) - detter - 17.02.2013

try to make custom func that checks if strings are matching


Re: Weird Bug. 0.3x (NPC OnClientMessage) - iamkevin - 17.02.2013

Quote:
Originally Posted by detter
Посмотреть сообщение
try to make custom func that checks if strings are matching
Did already, I even used it on a variable that successfully received the text data. I'm going to have to debug this with intellisense -_-