[Ajuda] Samp-server fechando sozinho
#1

Olб, apуs eu usar a funзгo dessa dialog, o samp-server fecha automaticamente.

Dialog:
PHP код:
Dialog:MDCVehicle(playeridresponselistiteminputtext[])
{
    if (
GetFactionType(playerid) != FACTION_POLICE || !IsACruiser(GetPlayerVehicleID(playerid)))
    return 
0;
    if(
response)
    {
        new 
string[256];
        for(new 
i=0i<MAX_VEHICLESi++)
        {
            if(
strcmp(inputtext,CarData[i][carPlaca], true) == 0)
            {
                if(
strcmp(inputtext,CarData[i][carPlaca], false) == 0)
                {
                    
Dialog_Show(playeridMDCVehicleDIALOG_STYLE_INPUT"Mobile Data Computer - Procura de Placa""PROCURA DE PLACA\n\nInsira a informaзгo da placa:\n{FF0000}Placa nгo encontrada.""OK""");
                    return 
1;
                }
                
format(stringsizeof(string), "RESULTADO DE BUSCA\n\nPlaca do Veнculo: %d\nModelo do Veнculo: %s\nDono do Veнculo: %s"CarData[i][carPlaca], ReturnVehicleModelName(CarData[i][carModel]), CarData[i][carOwner]);
                
Dialog_Show(playeridMDCResultDIALOG_STYLE_MSGBOX"Procurar Placa"string"Cancelar""");
            }
        }
    }
    return 
1;

Reply
#2

Olhando bem rбpido, nгo vi nada.

Mas recomendo fazer um debug pra ver a parte exata do cуdigo que tб com problema.
Reply
#3

Baixa o CrashDetect, e passa o log.
Reply
#4

Quote:
Originally Posted by neymar1477
Посмотреть сообщение
Baixa o CrashDetect, e passa o log.
[23:30:21] [debug] Server crashed while executing roleplay.amx
[23:30:21] [debug] AMX backtrace:
[23:30:21] [debug] #0 native strcmp () [00406540] from samp-server.exe
[23:30:21] [debug] #1 native CallLocalFunction () [00474390] from samp-server.exe
[23:30:23] [debug] Native backtrace:
[23:30:23] [debug] #0 74ff4f2d in ?? () from C:\Windows\syswow64\USER32.dll
[23:30:23] [debug] #1 004061b4 in ?? () from C:\Users\PC\Desktop\SAMP\MinhaGM\samp-server.exe
Reply
#5

Quote:
Originally Posted by Derritee1001
Посмотреть сообщение
[23:30:21] [debug] Server crashed while executing roleplay.amx
[23:30:21] [debug] AMX backtrace:
[23:30:21] [debug] #0 native strcmp () [00406540] from samp-server.exe
[23:30:21] [debug] #1 native CallLocalFunction () [00474390] from samp-server.exe
[23:30:23] [debug] Native backtrace:
[23:30:23] [debug] #0 74ff4f2d in ?? () from C:\Windows\syswow64\USER32.dll
[23:30:23] [debug] #1 004061b4 in ?? () from C:\Users\PC\Desktop\SAMP\MinhaGM\samp-server.exe
Aparece tudo certo no server log?

#edit

Jб vi.

Tente se informar nesse link: https://sampwiki.blast.hk/wiki/Fread
Reply
#6

Quote:
Originally Posted by ShOwD
Посмотреть сообщение
Aparece tudo certo no server log?

#edit

Jб vi.

Tente se informar nesse link: https://sampwiki.blast.hk/wiki/Fread
Sу que minha GM й MYSQL, ele estб salvando tudo no banco de dados dela.
Reply
#7

Nгo sei se й isso, mas tenta arrumar o code.

PHP код:
if(strcmp(inputtext,CarData[i][carPlaca], true) == 0
            { 


                if(
strcmp(inputtext,CarData[i][carPlaca], false) == 0
                { 
Reply
#8

Quote:
Originally Posted by Derritee1001
Посмотреть сообщение
Sу que minha GM й MYSQL, ele estб salvando tudo no banco de dados dela.
Vк se resolve...
pawn Код:
/* Sa-Mp Include Fix
 *
 * © by Kaliber, 2015
 *
 */

/******************************************************************************/
#if !defined _samp_included
    #include <a_samp>
#endif
/******************************************************************************/
#if defined _samp_fix
    #endinput
#endif
#define _samp_fix
/******************************************************************************/
native __fopen(name[], filemode:mode = io_readwrite) = fopen;
native __fwrite(File:handle, const string[]) = fwrite;
native __fread(File:handle, string[], size = sizeof string, bool: pack = false) = fread;
native __fclose(File:handle) = fclose;
/******************************************************************************/
stock File:_fopen(name[], filemode:mode = io_readwrite) {
    const File:error = File:-1;
    return (!fexist(name)) ? error : File:__fopen(name,mode);
}
/******************************************************************************/
#if defined _ALS_fopen
    #undef fopen
#else
    #define _ALS_fopen
#endif
#define fopen _fopen
/******************************************************************************/
stock _fwrite(File:handle, const string[])
    return (handle == File:-1) ? 0 : __fwrite(handle,string);
/******************************************************************************/
#if defined _ALS_fwrite
    #undef fwrite
#else
    #define _ALS_fwrite
#endif
#define fwrite _fwrite
/******************************************************************************/
stock _fread(File:handle, string[], size = sizeof string, bool: pack = false)
    return (handle == File:-1) ? 0 : __fread(handle,string,size,pack);
/******************************************************************************/
#if defined _ALS_fread
    #undef fread
#else
    #define _ALS_fread
#endif
#define fread _fread
/******************************************************************************/
stock _fclose(File:handle)
    return (handle == File:-1) ? 0 : __fclose(handle);
/******************************************************************************/
#if defined _ALS_fclose
    #undef fclose
#else
    #define _ALS_fclose
#endif
#define fclose _fclose
/******************************************************************************/
Reply
#9

Isso й uma include, salve-a e insira no inicio do GameMode.

PHP код:
#include <fix> 
Reply
#10

Agora deu esses erros quando eu coloquei o "#include <fix>" eu salvei a include.

pawno\include\fix.inc(1) : error 010: invalid function or declaration
pawno\include\fix.inc(3) : error 010: invalid function or declaration
pawno\include\fix.inc(1 : error 001: expected token: ")", but found "-identifier-"
pawno\include\fix.inc(1 : error 001: expected token: ";", but found "-identifier-"
pawno\include\fix.inc(34) : error 017: undefined symbol "handle"
pawno\include\fix.inc(43) : error 001: expected token: ")", but found "-identifier-"
pawno\include\fix.inc(43) : error 017: undefined symbol "pack"
pawno\include\fix.inc(43) : error 010: invalid function or declaration
pawno\include\fix.inc(43 -- 44) : fatal error 107: too many error messages on one line
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)