Сообщение от
DeimoS
Каким образом? Переменные, впоследствии, используются лишь в одном месте (при форматировании диалога). Он лишь лишние переменные инициализирует и лишнюю запись проводит.
Я не знаю куда Вы с мистером гулданом смотрели да и вопроса точно не было в каком участке кода, но я в одном месте увидел что переменная используется в 2 местах кода, а не в одном.
Код:
forward LoadWarpName(playerid, warp[]);
public LoadWarpName(playerid, warp[])
{
if(!cache_get_row_count(connect))
return SendClientMessage(playerid, -1, "Такого WARP'a не существует.(Используйте /warps -> Warp List)");
new
fmt_str[33-2+10+3],
Float:position_x = cache_get_field_content_float(0, "position_x", connect),
Float:position_y = cache_get_field_content_float(0, "position_y", connect),
Float:position_z = cache_get_field_content_float(0, "position_z", connect),
interior = cache_get_field_content_int(0, "int", connect),
virtual_world = cache_get_field_content_int(0, "virtual_world", connect);
printf("position_x: %f, position_y: %f, position_z: %f, interior: %d, virtual_world: %d",
position_x, position_y, position_z, interior, virtual_world);
SetPlayerPos(playerid, position_x, position_y, position_z);
SetPlayerInterior(playerid, interior);
SetPlayerVirtualWorld(playerid, virtual_world);
format(fmt_str, sizeof(fmt_str), "Вы были телепортированы на варп [%s]", warp);
SendClientMessage(playerid, -1, fmt_str);
return 1;
}
Что собственно быстрее чу-чуть чем двойное использование)