Changed the new %S format option to %a to hopefully prevent some confusion.
This commit is contained in:
parent
12ab387be5
commit
76a7cafe50
|
@ -495,10 +495,10 @@ reswitch:
|
|||
AddHex(&buf_p, llen, static_cast<unsigned int>(*get_amxaddr(amx, params[arg])), width, flags);
|
||||
arg++;
|
||||
break;
|
||||
case 'S':
|
||||
case 'a':
|
||||
{
|
||||
CHECK_ARGS(0);
|
||||
// %S is passed a pointer directly to a cell string.
|
||||
// %a is passed a pointer directly to a cell string.
|
||||
cell* ptr=reinterpret_cast<cell*>(*get_amxaddr(amx, params[arg]));
|
||||
if (!ptr)
|
||||
{
|
||||
|
|
|
@ -206,11 +206,11 @@ native ArraySwap(Array:which, item1, item2);
|
|||
native ArrayDeleteItem(Array:which, item);
|
||||
|
||||
/**
|
||||
* Creates a handle that is passable to a format compliant routine for printing as a string (with the %S parameter).
|
||||
* Creates a handle that is passable to a format compliant routine for printing as a string (with the %a format option).
|
||||
* It is suggested to pass the function directly as a parameter to the format routine.
|
||||
* The array contents must be a null-terminated string!
|
||||
*
|
||||
* An example usage: client_print(id, print_chat, "%S", ArrayGetStringHandle(MessageArray, i));
|
||||
* An example usage: client_print(id, print_chat, "%a", ArrayGetStringHandle(MessageArray, i));
|
||||
*
|
||||
* @param which The array the string is stored in.
|
||||
* @param item Which item to print the string value of.
|
||||
|
|
|
@ -200,7 +200,7 @@ public voteNextmap()
|
|||
if (++a >= g_mapNums) a = 0
|
||||
|
||||
g_nextName[g_mapVoteNum] = a
|
||||
pos += format(menu[pos], 511, "%d. %S^n", g_mapVoteNum + 1, ArrayGetStringHandle(g_mapName, a));
|
||||
pos += format(menu[pos], 511, "%d. %a^n", g_mapVoteNum + 1, ArrayGetStringHandle(g_mapName, a));
|
||||
mkeys |= (1<<g_mapVoteNum)
|
||||
g_voteCount[g_mapVoteNum] = 0
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user