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

Solved SetVariantString deprecated?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 07-11-2018 , 10:04   SetVariantString deprecated?
Reply With Quote #1

Hi,
I haven't been developing in SM for almost a year now and wanted to update a plugin of mine with a little safety fix. When compiling before any edits to make sure the code still works, I get a error of "Undefined symbol: SetVariantString". I'm using the latest SM now.

I cannot find any info on why this shouldn't work no more. Has SetVariantString been deprecated or something? I've tried finding any info on this in the recent updates but couldn't find any.
Compilation works fine on 1.8, but it throws the error on 1.9
__________________

Last edited by condolent; 07-11-2018 at 13:56.
condolent is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 07-11-2018 , 10:14   Re: SetVariantString deprecated?
Reply With Quote #2

try #include <sdktools_variant_t>

Edit: Are you including sdktools itself? It looks like that should be included when you include sdktools.

Last edited by Dr!fter; 07-11-2018 at 10:16.
Dr!fter is offline
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 07-11-2018 , 10:18   Re: SetVariantString deprecated?
Reply With Quote #3

Quote:
Originally Posted by Dr!fter View Post
try #include <sdktools_variant_t>

Edit: Are you including sdktools itself? It looks like that should be included when you include sdktools.
sdktools is included, do I really need to include sdktools_variant_t since it's inside sdktools?
__________________
condolent is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 07-11-2018 , 10:21   Re: SetVariantString deprecated?
Reply With Quote #4

Quote:
Originally Posted by condolent View Post
sdktools is included, do I really need to include sdktools_variant_t since it's inside sdktools?
You shouldnt have to, no. I can compile it fine. Does the include exist in your includes directory?
Dr!fter is offline
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 07-11-2018 , 10:23   Re: SetVariantString deprecated?
Reply With Quote #5

Quote:
Originally Posted by Dr!fter View Post
You shouldnt have to, no. I can compile it fine. Does the include exist in your includes directory?
It does, and it works to compile if I manually add
PHP Code:
#include <sdktools_variant_t> 
This is weird
__________________

Last edited by condolent; 07-11-2018 at 10:23.
condolent is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 07-11-2018 , 12:00   Re: SetVariantString deprecated?
Reply With Quote #6

Make sure sdktools.inc is up to date; there should be an include directive pointing to sdktools_variant_t there.
I suspect that you didn't overwrite your copy of the include with the new version. sdktools_variant_t.inc is new to 1.9.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop is offline
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 07-11-2018 , 12:01   Re: SetVariantString deprecated?
Reply With Quote #7

Quote:
Originally Posted by nosoop View Post
Make sure sdktools.inc is up to date; there should be an include directive pointing to sdktools_variant_t there.
I suspect that you didn't overwrite your copy of the include with the new version. sdktools_variant_t.inc is new to 1.9.
It's a fresh install of sourcemod and sdktools_variant_t is included in sdktools already
__________________
condolent is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 07-11-2018 , 13:22   Re: SetVariantString deprecated?
Reply With Quote #8

I only included sdktools and it compiled fine for me... not sure why you’d have issues.
Dr!fter is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 07-11-2018 , 13:43   Re: SetVariantString deprecated?
Reply With Quote #9

Tried it out aswell, didn't have to include sdktools_variant_t, it works gucci.
mug1wara is offline
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 07-11-2018 , 13:56   Re: SetVariantString deprecated?
Reply With Quote #10

I did another fresh install of SM and now it works, unsure why this happened!
My guess would be that I accidentally replaced sdkhooks with an previous version somehow, that'd be the only explanation...

Thanks for the help anyway!
__________________
condolent 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 14:52.


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