SA-MP Forums Archive
Help, server unknown crash problem. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help, server unknown crash problem. (/showthread.php?tid=523609)



Help, server unknown crash problem. - gtasarules14 - 03.07.2014

Hello, I need help with this problem. After today I added my server to my host, but after starting it, the server keeps going offline, I have posted to their support, but I have tried another host and the same problem happens.

My plugins load fine and they are wrote correctly, the server has no error 19, it loads the gamemode correctly.
I was told to download crash detect and this is what I get when I start it, Note, the server does work fine running on a home server.

[22:39:40] [debug] Run time error 6: "Invalid instruction"
[22:39:40] [debug] Unknown opcode 0x0 at address 0x00000001
[22:39:40] [debug] AMX backtrace:
[22:39:40] [debug] #0 00000001 in public Itter_OnGameModeInit () from ArmyLife.amx
[22:39:40] [debug] #1 native CallLocalFunction () [00472ad0] from samp-server.exe
[22:39:40] [debug] #2 00001868 in public Streamer_OnGameModeInit () from ArmyLife.amx
[22:39:40] [debug] #3 native CallLocalFunction () [00472ad0] from samp-server.exe
[22:39:40] [debug] #4 00000a8c in public zcmd_OnGameModeInit () from ArmyLife.amx
[22:39:40] [debug] #5 native CallLocalFunction () [00472ad0] from samp-server.exe
[22:39:40] [debug] #6 000001e4 in public OnGameModeInit () from ArmyLife.amx
[22:39:40]

I do not know if this is causing it, but is there anyway to fix this problem?

From the look of it, it looks like there is a problem in the script,I just can not figure out where, as I have added other gamemodes I have made and they worked fine. I would appreciate it greatly if someone could help me with this problem


Re: Help, server unknown crash problem. - Dignity - 03.07.2014

I think it has to do with your includes/plugins.

What OS is your desktop and what OS is your host?


Re: Help, server unknown crash problem. - gtasarules14 - 03.07.2014

My OS is Windows, and My hosts OS is Linux.

I do have the Linux plugins on the host such as streamer.so and sscanf.so


Re: Help, server unknown crash problem. - Dignity - 03.07.2014

pawn Код:
[22:39:40] [debug] #0 00000001 in public Itter_OnGameModeInit () from ArmyLife.amx
[22:39:40] [debug] #2 00001868 in public Streamer_OnGameModeInit () from ArmyLife.amx
[22:39:40] [debug] #4 00000a8c in public zcmd_OnGameModeInit () from ArmyLife.amx
[22:39:40] [debug] #6 000001e4 in public OnGameModeInit () from ArmyLife.amx
Notice how it specifies include/plugin directories infront of _OnGameModeInit?

Anyway, I did some research on the error code (not really research but whatever) and the issue mainly seemed to be caused by either param or callback misplacement.

Can I see OnGameModeInit callback?

EDIT: Do you have main(); ontop of your script?

If you don't, add it. If you do, do you use the callbacks at all? If you closed the function using ";", please add empty callbacks instead of just closing it with ";".


Re: Help, server unknown crash problem. - gtasarules14 - 03.07.2014

main()
{
print("\n----------------------------------");
print("Army Life by gtasarules14");
print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
Objects are here. not gonna post all of it
return 1;
}

Alright so now what would I do


Re: Help, server unknown crash problem. - Dignity - 03.07.2014

Do you stream objects? If so, what does your syntax look like?


Re: Help, server unknown crash problem. - gtasarules14 - 03.07.2014

Yes, I do.

It looks like this CreateObject(3932, 1471.65039, -1641.69519, 14.72930, 0.00000, 0.00000, -55.00000);


Re: Help, server unknown crash problem. - Dignity - 03.07.2014

Is there anything else under OnGameModeInit besides the objects?


Re: Help, server unknown crash problem. - gtasarules14 - 03.07.2014

CreateVehicle
AddPlayerClass
AddStaticVehicle
CreateRentalVehicle
Create3DTextLabel
DisableInteriorEnterExits();

These are all under OnGameModeInit


Re: Help, server unknown crash problem. - nickdodd25 - 03.07.2014

To help narrow down the error you can compile your mode with a -d3 flag then it will show you the lines it happens on in the error.

You can read more about it here and learn how to do it .... https://github.com/Zeex/samp-plugin-...ith-debug-info