G 
		
				
				
			
		golgo32
Guest
I'm having a problem with Entity I/O and Strings.  I use COutputString::Set() to set the value of the output and fire it.  
	
	
	
		
The problem is the strings received by connected entities are garbage. I stepped through the code and have confirmed that the variant_t is being set properly inside of COutputString::Set(). I've tried connecting this output many different entities that take strings as inputs (both ones I've made, and ones that came with hl2) and all receive garbage. As far as I can tell, everything I'm doing is server-side so I don't think it's a client/server issue. I also stepped through the receiving entities' code and have determined that the field type is still correct (FIELD_STRING) on the receiving end.
Any ideas?
Thanks,
-Andrew
				
			
		Code:
	
	string s;    
...
string_t x = MAKE_STRING( s.c_str() );
newSpeech.Set(x, this, this);
	The problem is the strings received by connected entities are garbage. I stepped through the code and have confirmed that the variant_t is being set properly inside of COutputString::Set(). I've tried connecting this output many different entities that take strings as inputs (both ones I've made, and ones that came with hl2) and all receive garbage. As far as I can tell, everything I'm doing is server-side so I don't think it's a client/server issue. I also stepped through the receiving entities' code and have determined that the field type is still correct (FIELD_STRING) on the receiving end.
Any ideas?
Thanks,
-Andrew