Szerző Téma: Windows & Linux elérési utak?  (Megtekintve 451 alkalommal)

Windows & Linux elérési utak?
« Dátum: 2013. Szeptember 21. - 15:28:30 »
0 Show voters
Sziasztok!
Korábban nyitottam egy témát ezzel kapcsolatban: http://sampforum.hu/index.php?topic=47348.0
Itt a kódban lévõ problémát sikerült megoldani, megy is windows-on minden rendesen, viszont ha feltöltöm linux-os szerverre, semmit sem csinál.
Szerintem az elérési útvonallal lehet a hiba.
A windows megtalálta a \"./scriptfiles/ladmin/users/\" helyen a fájlokat, viszont a linux nem hajlandó rá. :/
A plugin betöltõdik rendesen!
A végleges kód a következõ:
 
#include <a_samp>
#include <filemanager>
#include <Dini>
public OnFilterScriptInit()
{
new dir:dHandle = dir_open(\"./scriptfiles/ladmin/users/\");
new item[255], type;
while(dir_list(dHandle, item, type))
{
    if(type == FM_FILE)
    {
    new file[255]; format(file, sizeof(file), \"ladmin/users/%s\",item);
    if(dini_Exists(file))
    {
    printf(\"%s\", file);
    dini_IntSet(file,\"money\",0);
    }
         }
}
dir_close(dHandle);
return 1;
}

 
Szerintetek mi lehet a hiba? linux hogy kezeli az elérési utakat?
« Utoljára szerkesztve: 2013. Szeptember 23. - 20:11:59 írta DamieN007 »

Nem elérhető AnthonyGates

  • 546
  • AnthonyGates
    • Profil megtekintése
Windows & Linux elérési utak?
« Válasz #1 Dátum: 2013. Szeptember 21. - 15:35:55 »
0 Show voters
#include <a_samp>
#include <filemanager>
#include <Dini>
public OnFilterScriptInit()
{
new dir:dHandle = dir_open(\"../scriptfiles/ladmin/users/\");
new item[255], type;
while(dir_list(dHandle, item, type))
{
    if(type == FM_FILE)
    {
    new file[255]; format(file, sizeof(file), \"../ladmin/users/%s\",item);
    if(dini_Exists(file))
    {
    printf(\"%s\", file);
    dini_IntSet(file,\"money\",0);
    }
         }
}
dir_close(dHandle);
return 1;
}

Windows & Linux elérési utak?
« Válasz #2 Dátum: 2013. Szeptember 21. - 15:49:55 »
0 Show voters
Így leáll a szerver. :/
A screenlog ezt a sort adja ki:
\"/servers/scripts/samp_run: line 31:  8668 Segmentation fault      ./samp03svr $3\"
Crashdetect plugin ezt a hibaüzenetet adja ki:
 
[debug] Server crashed while executing TESZT.amx
[debug] AMX backtrace:
[debug] #0 native dir_list () [b758db20] from filemanager.so
[debug] #1 00000e5c in public OnFilterScriptInit () at D:\\server1\\filterscripts\\TESZT.pwn:10
[debug] System backtrace:
[debug] #0 b74d70f3 in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[debug] #1 b74ceb61 in _ZN11crashdetect20PrintSystemBacktraceEPv () from plugins/crashdetect.so
[debug] #2 b74d1405 in _ZN11crashdetect15SystemExceptionEPv () from plugins/crashdetect.so
[debug] #3 b74d6c42 in ?? () from plugins/crashdetect.so
[debug] #4 b7849400 in ?? ()
[debug] #5 b762a96d in readdir () from /lib/i386-linux-gnu/libc.so.6
[debug] #6 b758db42 in ?? () from plugins/filemanager.so
[debug] #7 b74d19d5 in _ZN11crashdetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so
[debug] #8 b74d51ca in ?? () from plugins/crashdetect.so
[debug] #9 b74d9136 in amx_Exec () from plugins/crashdetect.so
[debug] #10 b74d18b4 in _ZN11crashdetect9DoAmxExecEPii () from plugins/crashdetect.so
[debug] #11 b74d5203 in ?? () from plugins/crashdetect.so
[debug] #12 080a9376 in ?? () from ./samp03svr
[debug] #13 080a739d in ?? () from ./samp03svr
[debug] #14 080a7d37 in ?? () from ./samp03svr
[debug] #15 080b41e7 in ?? () from ./samp03svr
[debug] #16 080b5729 in ?? () from ./samp03svr
[debug] #17 080b5792 in ?? () from ./samp03svr
[debug] #18 080b10a3 in ?? () from ./samp03svr
[debug] #19 b75ace37 in __libc_start_main () from /lib/i386-linux-gnu/libc.so.6
[debug] #20 0804b521 in ?? () from ./samp03svr

 
Update: Idõközben sikerült megoldanom.
« Utoljára szerkesztve: 2013. Szeptember 23. - 20:12:36 írta DamieN007 »

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal