Jump to content
  • 0

pomoc Vytvoreni slozky/adresare


Fisher

Dotaz

Ahoj lidi, chci se zeptat jestly existuje nějaká funkce něco jako fcreate, akorát aby dokázala vytvorit slozku/adresar?
Děkuju moc :)

 

stock  fcreate(subor[]) {
   new File:file;
   if(fexist(subor)) return 0;
   file=fopen(subor,io_write);
   fclose(file);
   return 1;
}

Link to comment
Share on other sites

2 odpovědí na tuto otázku

Recommended Posts

  • 0

V pôvodnom Pawn sa nič také nedá.
Stiahni si plugin. :)

PS.:
Kto vie pawniť opravte mi toto: :d


Tvoja funkcia vyššie sa dá definovať takto:

#define fcreate(%0) (fexist(%0) ? (_:0) : (_:fclose(fopen(%0, io_write))))

Edit: Tak nedá. :d Resp. dá, ale hodí warning.
Pri

fcreate("x"); 

dostanem warning 215 - expression has no effect.
Ak je tu nejaký pawner, čo by vedel ako to v SA:MP potlačiť bez Zeexovho pluginu, napíšte. :)

 

 

Edited by 托马斯
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...