View Single Post
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-13-2010 , 14:55   Re: natives and text params
Reply With Quote #4

Yea, your code is wrong.

Code:
public plugin_natives( ) {     register_native( "get_some_string", "_get_some_string" ); } public _get_some_string( iPlugin, iParams ) {     static const szStrings[ ][ ] = {         "rawr", "hello", "i like cookies"     };         set_string( 1, szStrings[ random( sizeof( szStrings ) ) ], get_param( 2 ) );         return 1; }
Code:
native get_some_string( szString[ ], const iMaxLen ); // --- new szString[ 32 ]; get_some_string( szString, 31 ); log_amx( "Some String: %s", szString );
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline