AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Solved SetVariantString deprecated? (https://forums.alliedmods.net/showthread.php?t=309039)

condolent 07-11-2018 10:04

SetVariantString deprecated?
 
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

Dr!fter 07-11-2018 10:14

Re: SetVariantString deprecated?
 
try #include <sdktools_variant_t>

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

condolent 07-11-2018 10:18

Re: SetVariantString deprecated?
 
Quote:

Originally Posted by Dr!fter (Post 2602940)
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?

Dr!fter 07-11-2018 10:21

Re: SetVariantString deprecated?
 
Quote:

Originally Posted by condolent (Post 2602944)
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?

condolent 07-11-2018 10:23

Re: SetVariantString deprecated?
 
Quote:

Originally Posted by Dr!fter (Post 2602946)
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

nosoop 07-11-2018 12:00

Re: SetVariantString deprecated?
 
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.

condolent 07-11-2018 12:01

Re: SetVariantString deprecated?
 
Quote:

Originally Posted by nosoop (Post 2602964)
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

Dr!fter 07-11-2018 13:22

Re: SetVariantString deprecated?
 
I only included sdktools and it compiled fine for me... not sure why you’d have issues.

mug1wara 07-11-2018 13:43

Re: SetVariantString deprecated?
 
Tried it out aswell, didn't have to include sdktools_variant_t, it works gucci.

condolent 07-11-2018 13:56

Re: SetVariantString deprecated?
 
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!


All times are GMT -4. The time now is 11:26.

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