Raised This Month: $12 Target: $400
 3% 

[L4D2]Keyman.sp compiling issue


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Balloons
Member
Join Date: Feb 2020
Old 02-24-2020 , 01:21   [L4D2]Keyman.sp compiling issue
Reply With Quote #1

Hi I'm trying to recompile this plugin since it was in Russian with half of the text translated. Not only that, I'm also going to change timer values.

Code:
//// Keyman.sp
//
//Entity_pro_stocks.inc(409) : warning 209: function "GetEntityRenderColor" should return a value
//Keyman.sp(396) : error 092: number of arguments does not match definition
//Keyman.sp(398) : warning 213: tag mismatch
//Keyman.sp(1288) : error 021: symbol already defined: "GetEntityRenderColor"
//Keyman.sp(1299) : error 088: cannot return a value from a void function
//Keyman.sp(1299) : warning 213: tag mismatch
//Keyman.sp(1301) : error 088: cannot return a value from a void function
//Keyman.sp(1301) : warning 213: tag mismatch
//Keyman.sp(1288) : error 180: function return type differs from prototype. expected 'void', but got 'int'
Line 396 (Starting at 390)
Spoiler


Line 1288
Spoiler
Balloons is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 02-24-2020 , 05:46   Re: [L4D2]Keyman.sp compiling issue
Reply With Quote #2

The GetEntityRenderColor function already exist in SourceMod, you need to rename your function.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
foxhound27
AlliedModders Donor
Join Date: Sep 2019
Location: Argentina
Old 03-01-2020 , 23:23   Re: [L4D2]Keyman.sp compiling issue
Reply With Quote #3

PHP Code:
stock int ReturnEntityRenderColor(int entity) {
    if (
entity 0) {
        
int offset GetEntSendPropOffs(entity"m_clrRender");
        
int r GetEntData(entityoffset1);
        
int g GetEntData(entityoffset 11);
        
int b GetEntData(entityoffset 21);
        
char rgb[10];
        
Format(rgbsizeof(rgb), "%d%d%d"rgb);
        
int color StringToInt(rgb);
        return 
color;
    }
    return 
0;

foxhound27 is offline
foxhound27
AlliedModders Donor
Join Date: Sep 2019
Location: Argentina
Old 03-01-2020 , 23:29   Re: [L4D2]Keyman.sp compiling issue
Reply With Quote #4

then use like

PHP Code:
new color ReturnEntityRenderColor(k); 
foxhound27 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 04:00.


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