Using #define Instead of Stock here
#10

Quote:
Originally Posted by Carloselunico
Посмотреть сообщение
no? comes to criticize but do not contribute anything.
pawn Код:
new ArrayGlobal[256];
#define GetFile(%0) \
((format(ArrayGlobal, sizeof(ArrayGlobal), "players/%s.ini", Name(%0)), ArrayGlobal))
pawn Код:
stock Name(p)
{
new aux[MAX_PLAYER_NAME];
GetPlayerName(p, aux, sizeof(aux));
return aux;
}

----------------------------------------------------
Look:


pawn Код:
if(!strcmp("/mifile", cmdtext, true))
{
SendClientMessage(playerid, -1, GetFile(playerid)); // show file name text players/carlos.ini
if(fexist(GetFile(playerid))) return SendClientMessage(playerid, -1, #ifexists); // if exist
else SendClientMessage(playerid, -1, #Noexists); // if no exists
return 1;
}
No need for a 256 array size what is the purpose for that?
Reply


Messages In This Thread
Using #define Instead of Stock here - by Swimor - 23.05.2013, 16:32
Re: Using #define Instead of Stock here - by Vince - 23.05.2013, 18:13
Re: Using #define Instead of Stock here - by Swimor - 24.05.2013, 04:02
Re: Using #define Instead of Stock here - by Bakr - 24.05.2013, 04:21
Re: Using #define Instead of Stock here - by 2KY - 24.05.2013, 04:34
Respuesta: Using #define Instead of Stock here - by Carloselunico - 24.05.2013, 05:16
Re: Using #define Instead of Stock here - by Bakr - 24.05.2013, 05:27
Respuesta: Using #define Instead of Stock here - by Carloselunico - 25.05.2013, 18:09
Re: Using #define Instead of Stock here - by Bakr - 25.05.2013, 18:36
Re: Respuesta: Using #define Instead of Stock here - by Pottus - 25.05.2013, 18:38

Forum Jump:


Users browsing this thread: 1 Guest(s)