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

[TF2] Connect announce compiling problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
scptrx
AlliedModders Donor
Join Date: Aug 2015
Location: The Netherlands
Old 11-28-2015 , 18:30   [TF2] Connect announce compiling problem
Reply With Quote #1

I've tried making an modded version which includes morecolors.inc and a major bug fix. of the original "Connect Announce" plugin. (https://forums.alliedmods.net/showthread.php?t=77306)

However, when compiling I got the following errors:


Here is all the code:

cannounce.sp
Spoiler


allow.sp
Spoiler


disallow.sp
Spoiler


set.sp
Spoiler


sound.sp
Spoiler

Last edited by scptrx; 11-28-2015 at 18:32.
scptrx is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 11-28-2015 , 19:35   Re: [TF2] Connect announce compiling problem
Reply With Quote #2

GetClientAuthId expects an AuthIdType as its third argument. Valid AuthIdTypes are AuthId_Engine, AuthId_Steam2, AuthId_Steam3, and AuthId_SteamID64. Refs https://sm.alliedmods.net/new-api/cl...etClientAuthId.

So in your case it should look like GetClientAuthId(target_list[0], PUT THE AUTH ID TYPE HERE, steamId, sizeof(steamId)). I'm not sure which one you would want though. At a glance it looks like that should solve most of your problems.

(Also, I'm pretty sure this can go in Scripting and not General).
__________________
~Wliu

Last edited by Wliu; 11-28-2015 at 19:35.
Wliu is offline
scptrx
AlliedModders Donor
Join Date: Aug 2015
Location: The Netherlands
Old 11-29-2015 , 05:43   Re: [TF2] Connect announce compiling problem
Reply With Quote #3

Quote:
Originally Posted by Wliu View Post
GetClientAuthId expects an AuthIdType as its third argument. Valid AuthIdTypes are AuthId_Engine, AuthId_Steam2, AuthId_Steam3, and AuthId_SteamID64. Refs https://sm.alliedmods.net/new-api/cl...etClientAuthId.

So in your case it should look like GetClientAuthId(target_list[0], PUT THE AUTH ID TYPE HERE, steamId, sizeof(steamId)). I'm not sure which one you would want though. At a glance it looks like that should solve most of your problems.

(Also, I'm pretty sure this can go in Scripting and not General).
So i need to replace ((steamId) with something like ((AuthId_Steam3) ?

Or do i need to put
if( target_count > 0 && GetClientAuthId(target_list[0], AuthId_SteamID64, steamId, sizeof(steamId)) )

Last edited by scptrx; 11-29-2015 at 06:01.
scptrx is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 11-29-2015 , 11:09   Re: [TF2] Connect announce compiling problem
Reply With Quote #4

The bolded one.
__________________
~Wliu
Wliu is offline
scptrx
AlliedModders Donor
Join Date: Aug 2015
Location: The Netherlands
Old 11-29-2015 , 11:26   Re: [TF2] Connect announce compiling problem
Reply With Quote #5

Quote:
Originally Posted by Wliu View Post
The bolded one.
I need to put that in every .sp file that has errors?
scptrx is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 11-29-2015 , 13:46   Re: [TF2] Connect announce compiling problem
Reply With Quote #6

Probably. Just look at each error you're receiving (for example, line 71 of allow.sp).
__________________
~Wliu
Wliu is offline
scptrx
AlliedModders Donor
Join Date: Aug 2015
Location: The Netherlands
Old 11-29-2015 , 14:20   Re: [TF2] Connect announce compiling problem
Reply With Quote #7

Quote:
Originally Posted by Wliu View Post
Probably. Just look at each error you're receiving (for example, line 71 of allow.sp).
Alright, I'll let you know if i'm still getting any errors.
scptrx is offline
scptrx
AlliedModders Donor
Join Date: Aug 2015
Location: The Netherlands
Old 11-29-2015 , 14:43   Re: [TF2] Connect announce compiling problem
Reply With Quote #8

Thanks alot for your help Wliu. Everything went well when compiling, no errors.

Last edited by scptrx; 11-29-2015 at 14:45.
scptrx is offline
scptrx
AlliedModders Donor
Join Date: Aug 2015
Location: The Netherlands
Old 11-29-2015 , 16:08   Re: [TF2] Connect announce compiling problem
Reply With Quote #9

UPDATE:

Looks like morecolors doesn't work... It literally displays {PURPLE} In chat. Not the actual color.
scptrx is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 11-29-2015 , 16:13   Re: [TF2] Connect announce compiling problem
Reply With Quote #10

Replace PrintToChat with CPrintToChat. Same with PrintToChatAll, PrintHintText, etc. variants.
__________________
~Wliu
Wliu is offline
Reply



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 16:07.


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