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

Not a valid string error using new syntax


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Chaosxk
Veteran Member
Join Date: Aug 2010
Location: Westeros
Old 09-05-2015 , 18:20   Not a valid string error using new syntax
Reply With Quote #1

Hi, i've been converting my plugins to the new syntax using #pragma newdecls required

Script compiles fine except when i load the plugin it errors out with this:
PHP Code:
L 09/05/2015 18:12:20: [SMNative "SetEntPropString" reportedProperty "m_iName" is not a valid string
L 09
/05/2015 18:12:20: [SMDisplaying call stack trace for plugin "bossspawner.smx":
L 09/05/2015 18:12:20: [SM]   [0]  Line 943bossspawner.sp::SetupMapConfigs()
L 09/05/2015 18:12:20: [SM]   [1]  Line 123bossspawner.sp::OnConfigsExecuted() 
Heres the code:
PHP Code:
int ent CreateEntityByName("info_target");
if(
IsValidEntity(ent)) {
    
SetEntPropString(entProp_Data"m_iName""spawn_loot");
    
TeleportEntity(enttposNULL_VECTORNULL_VECTOR);
    
DispatchSpawn(ent);

The code worked fine with the old syntax, don't know why it doesn't now. Any ideas?
__________________
Chaosxk is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 09-05-2015 , 18:41   Re: Not a valid string error using new syntax
Reply With Quote #2

This has nothing to do with the syntax, try a current snapshot of SourceMod (there have been various changes to the handling of string props recently).
__________________
asherkin is offline
Chaosxk
Veteran Member
Join Date: Aug 2010
Location: Westeros
Old 09-05-2015 , 18:54   Re: Not a valid string error using new syntax
Reply With Quote #3

Thanks, that did the trick.
__________________
Chaosxk 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 22:39.


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