Does this make sense to anyone of you?
PHP Code:
client_print( 0, print_chat, "Getting the zone..." )
new szCurrentZone[ 32 ]
if( ARP_GetUserZone( id, szCurrentZone, charsmax( szCurrentZone ) ) )
{
client_print( 0, print_chat, "CurrentZone: %s", szCurrentZone )
// outputs: CurrentZone: Wagnaria
new aData[ FileStruct ]
ArrayGetArray( g_aAllSounds, iArrayId, aData )
client_print( 0, print_chat, "Setting trie string to %s. Zone: %s", aData[ __szFileName ], szCurrentZone )
// outputs: Setting trie string to wagnaria.mp3. Zone: agnaria.mp3
TrieSetString( g_tZones, szCurrentZone, aData[ __szFileName ] )
new szMusic[ 32 ]
TrieGetString( g_tZones, szCurrentZone, szMusic, charsmax( szMusic ) )
client_print( 0, print_chat, "The Trie string of %s is now %s.", szCurrentZone, szMusic )
// outputs: The Trie string of agnaria.mp3 is now wagnaria.mp3.
}
As you can see, the first client_print outputs the correct string, but the second one is where things start getting strange. Without ABSOLUTELY ANY change to the szCurrentZone string, for some reason after the ArrayGetArray native call it changes itself to agnaria.mp3, which is aData[ __szFileName ] without the first letter.
What is going on? This is getting me a headache... And why is it always me with these weird ass problems?