08.10.2011, 10:51
(
Последний раз редактировалось iPLEOMAX; 08.10.2011 в 18:37.
)
(It's a help topic)
So, I'm at the last part of my plugin but I'm facing some troubles retrieving strings.
I have this in my script:
C++
But sometimes i get this returned: "¶ШW\МММММММММММйИ™\4ъ]ьџ\ђ@"
What am I doing wrong here? Should i convert it? :/
Don't go hard on me, I'm not an experienced c++ scripter.
EDIT: Solved with some alternative methods.
So, I'm at the last part of my plugin but I'm facing some troubles retrieving strings.
I have this in my script:
C++
Код:
char *StoredString[10]; //PAWN Native: SetString(slotid, string[]); static cell AMX_NATIVE_CALL SetString( AMX* amx, cell* params ) { int slotid = params[1]; char *inputstring; amx_StrParam(amx, params[2], inputstring); StoredString[slotid] = inputstring; return 1; } //PAWN Native: GetString(slotid, returnstring[]); static cell AMX_NATIVE_CALL GetString( AMX* amx, cell* params ) { int slotid = params[1]; cell* return_str; amx_GetAddr(amx, params[2], &return_str); amx_SetString ( tdstr, StoredString[slotid], 0, 0, 128); return 1; }
What am I doing wrong here? Should i convert it? :/
Don't go hard on me, I'm not an experienced c++ scripter.
EDIT: Solved with some alternative methods.