Post by Spawner[G] on Jun 26, 2016 0:41:55 GMT
Chi 7ajat sghar khassk t3rafhom
Macro
macro hiya ayi haja kat tbda bi #, f7al #define, #pragma, #if, #elseif ... o hiya chi haja m9awda ga3 kat t7tajha bezaf fel codes mta3k, n3tik mital dyal #pragma
#pragma dynamic 32768 // Hada macro o kay tssama 7ta pre-processor
Had l macro ghi zido fi script ta3k o ghadi in9oss lik l size d file ghi chwiya walakin rah useful/mofiiid
n3tiw mital akhor dyal
#define
#define = kat treje3 lik chi haja t9dar tkon text=> string kay kon mektob mabin quotes -> "" , awla integer numbers -> 1,2,3,4 ... awla float(3adad 3achari) -> 1.3 , 1.4 , 1.5 awla hexadecimal -> 0x23 ila chafto 0x raha kat t3ni ze3ma hex , o howa majmo3 fih a3dad o 7orof f7al 0x1A ...
mohim ila fhamti hadchi mazian ila mafhamtich 9alab ( google it ... ) 9alab 3la string o integer o ....
lgharad men #define howa tasshil lma2moriya bach lhaja mat3awdch dirha matalan, ma7taj fi ayi haja dir wahad number twil o ma7taj diro chi 10 l marat fi client_cmd ola client_print
idan adir
#define codeNum 1234567890
o fi client_print adir codeNum => client_print(id , 3 , "%d", codeNum )
nchra7 likom be3da had client_print, had client_print men smiya kay ban lik ach kay dir, kay biyen msg l client o 3ando des parametres, mais atgoli chnahoma les parametres? les parametres howa hado client_print( PARAMETRES1 , PARAMETRES2 , PARAMETRES3 ) => kifma biyent lik kaynin 3 les param, o kola wahad ach kay dir, lowlani kay golik wach had message atsayfto lkolchi ola ghir "id" dik id = index, index kola wahad 3ando index ta3o fi server finma kay tconnecta kat t3ta lih index, o howa kay 3tamad 3la les slots ta3 server, mataln kayn 32 slots max fi sv, idan max dyal index howa 32, t9dar dir status fi console o tchuf index 3and kola wahad.
PARAMETRES2 kat tktab fih chi haja mabin les quotes "" dakchi li bghiti o safi o t9dar tzid chi %d ola %s ola %x ola %f ola %i
%d o %i = decimal / integer
%s = string
%x = hexadecimal
%b = binaire wa9ila hadi makinach ma3rftch, binaire kay kon metkowen ghi men 1 o 0 homa li khadamn bi daba fi les transfert ta3 les banques o ta3 ch7al men haja kay kono 3la had chkal 0101000101101 o hadi kat t3ni chi haja o rah kayna conversion dyal binaire l ASCII, o ASCII hiya li kat decodihom msaybha miricani ola ma3at, mohim ... nkamlo
PARAMTRES3 ayi haja men hadok %d %s %x ktabtiha fi parametres2 khassk tkharjha fi PARAMETRES3 o tgolihom ach baghi tbiyan
PART2 JAY FI TRI9 mais fi wa9t akhor