Raised This Month: $9 Target: $400
 2% 

Errors in the script


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Laser32
AlliedModders Donor
Join Date: Sep 2006
Location: Germany (Schwerin)
Old 01-29-2014 , 04:58   Errors in the script
Reply With Quote #1

Hello people

I made ​​a mistake in my script line 1085

Quote:
Error: features.sp (1085) error: function heading 025 Differs from prototype
Here's the code:

Line 1085
Quote:
public Action:OnChatMessage(&client, &Handle:recipients, String:name[], String:message[])

the whole code
Quote:
// Feature Custom Chat Colors
public Action:OnChatMessage(&client, &Handle:recipients, String:name[], String:message[])
{
if (clients_isValidClient(client, false))
{
if (clients_hasFeature(client, FEATURE_COLORS))
{
new String:matchedTag[64];
new String:Copy[64];

while (MatchRegex(g_Regex, message) > 0)
{
GetRegexSubString(g_Regex, 0, matchedTag, sizeof(matchedTag));

new location = StrContains(message, matchedTag);

if (location == -1)
{
break;
}

strcopy(Copy, sizeof(Copy), matchedTag);
ReplaceStringEx(Copy, sizeof(Copy), "#", "\x07");
ReplaceStringEx(message, MAXLENGTH_MESSAGE, matchedTag, Copy);
}

while (MatchRegex(g_Regex2, message) > 0)
{
GetRegexSubString(g_Regex2, 0, matchedTag, sizeof(matchedTag));

new value;
new location = StrContains(message, matchedTag);

if (location == -1)
break;

strcopy(Copy, sizeof(Copy), matchedTag);
ReplaceString(Copy, sizeof(Copy), "{", "");
ReplaceString(Copy, sizeof(Copy), "}", "");

if (GetTrieValue(g_CTrie, Copy, value))
{
Format(Copy, sizeof(Copy), "\x07%06X", value);
}

ReplaceStringEx(message, MAXLENGTH_MESSAGE, matchedTag, Copy);
}
}

if (clients_hasFeature(client, FEATURE_NAMECOLOR))
{

Format(name, 128, "%s%s", g_Player[client][CL_NAMECOLOR], name);
}

return Plugin_Changed;
}

return Plugin_Continue;
}
I have all inc files.

pls help

srry my English is bad

Last edited by Laser32; 01-29-2014 at 05:01.
Laser32 is offline
CyberStars
Senior Member
Join Date: May 2013
Old 01-29-2014 , 05:04   Re: Errors in the script
Reply With Quote #2

Show all code. From this part nothing is clear.
CyberStars is offline
Laser32
AlliedModders Donor
Join Date: Sep 2006
Location: Germany (Schwerin)
Old 01-29-2014 , 05:06   Re: Errors in the script
Reply With Quote #3

DONE
Laser32 is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 01-29-2014 , 05:09   Re: Errors in the script
Reply With Quote #4

No, it is not done. You have only posted a few dozen lines, and there are at least 1085.

Post the entire code, using [php] tags rather than [quote] tags.
__________________

Last edited by ddhoward; 01-29-2014 at 05:10.
ddhoward is offline
Laser32
AlliedModders Donor
Join Date: Sep 2006
Location: Germany (Schwerin)
Old 01-29-2014 , 07:35   Re: Errors in the script
Reply With Quote #5

this is a private plugin code and I will not post here. but it has done himself.
Post can be closed
Laser32 is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 01-29-2014 , 10:32   Re: Errors in the script
Reply With Quote #6

The obvious answer is that
PHP Code:
public Action:OnChatMessage(&client, &Handle:recipientsString:name[], String:message[]) 
didn't match what the OnChatMessage global forward was declared as.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:09.


Powered by vBulletin®
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Theme made by Freecode