Problem with gamemode
#1

Hello,i've a problem with my gamemode.

I'm using a volt-host test server for testing it,and when i spawn,the server shutdown.

In my localhost it works.

What's wrong?

Here is OnPlayerSpawn:

pawn Код:
public OnPlayerSpawn(playerid)
{  
    if(PlayerInfo[playerid][pJailed] == 1)
    {
    SendClientMessage(playerid,0xFF0000FF,"Welcome,go back in the jail and pay for your crimes.");
    new Random = random(sizeof(RandomJailSpawns));
    SetPlayerPos(playerid, RandomJailSpawns[Random][0], RandomJailSpawns[Random][1], RandomJailSpawns[Random][2]);
    SetPlayerFacingAngle(playerid, RandomJailSpawns[Random][3]);
    }
   
    if(gTeam[playerid] == TEAM_CIV)
    {
    new Random = random(sizeof(RandomCivSpawns));
    SetPlayerPos(playerid, RandomCivSpawns[Random][0], RandomCivSpawns[Random][1], RandomCivSpawns[Random][2]);
    SetPlayerFacingAngle(playerid, RandomCivSpawns[Random][3]);
    }
   
    IsRobbing[playerid] =0;
    SetPlayerToTeamColour(playerid);
    return 1;
}
I've tried all,debugging this callback,removing silly timers but nothing,still shutdown.

The includes/plugins are updated for 0.3e

Please help me fix this annoying problem.
Reply
#2

Your sure u used the right plugins?

Linux can get pretty weird sometimes. What Linux OS do you have? Debian 6?
Reply
#3

Quote:
Originally Posted by Blunt P
Посмотреть сообщение
Your sure u used the right plugins?

Linux can get pretty weird sometimes. What Linux OS do you have? Debian 6?
I use Volt-Host and they use Linux,but i dont know the OS version.

Yes,im sure that im using the right plugins because i'm developing another gamemode with same includes/plugins and it works. (This another gamemode is in the same samp folder,so it's just 1 pawno.exe to compile it).

Quote:
Originally Posted by ******
Посмотреть сообщение
If you tried debugging it, where are all your prints? And what was the last thing printed before it shut down?
I deleted my prints,it prints all with no errors.

The last thing printed before shutdown is....nothing.Even in server_log i got nothing.

The last line is: Test has joined the server.And stop.

No errors/debugs or other.
Reply
#4

Quote:
Originally Posted by ******
Посмотреть сообщение
If that's the last thing that gets printed, the error is unlikely to be in OnPlayerSpawn, which is called significantly after OnPlayerRequest and a number of other callbacks - focus your debugging in those instead.
OnPlayerRequest- Class/Spawn ..?
Reply
#5

main, ongamemodeinit, class, spawn
Reply
#6

Ok,i've debugged OnGameModeInit,OnPlayerRequestSpawn and OnPlayerRequestClass,here is:

OnGameModeInit:

Quote:

[12:44:27] Wanted Level Timer Set.
[12:44:27] Money Bag Timer Set
[12:44:27] HP/Armour/Cash Textdraw Timer Set.
[12:44:27] Speed Check Wanted Level Timer Activated.
[12:44:27] Random Weather Change Timer Activated
[12:44:27] Timer for max 90HP/ARMOUR and wanted level reduce timer set.
[12:44:27] Zones updating timer set.
[12:44:27] 3dTextLabelsCreated
[12:44:27] AntiDeAMX Loaded.
[12:44:27] Infernus car loaded
[12:44:27] Tornado car loaded
[12:44:27] Police SF car loaded.
[12:44:27] Cityhall building created.
[12:44:27] EnableStuntBonusForAll set to 0.
[12:44:27] Buildings removed.
[12:44:27] Zones textdraw started.
[12:44:27] Buildings removed.
[12:44:27] Zones textdraw started.
[12:44:27] Buildings removed.
[12:44:27] Zones textdraw started.
[12:44:27] Buildings removed.
[12:44:27] Zones textdraw started.
[12:44:27] Medical fees textdraw started.
[12:44:27] Med. Fees Txtdraw part 2 started
[12:44:27] Med. Fees Txtdraw part 3 started
[12:44:27] Dynamic checkpoints created.
[12:44:27] Gamemodetext set.
[12:44:27] Cops class 1 loaded
[12:44:27] Civilians class 1 loaded
[12:44:27] Civ. class 2 loaded
[12:44:27] Civ. class 3 loaded
[12:44:27] Civ. class 4 loaded
[12:44:27] Civ. class 5 loaded
[12:44:27] Civ. class 6 loaded
[12:44:27] Civ. class 7 loaded
[12:44:27] Civ. class 8 loaded
[12:44:27] Civ. class 9 loaded
[12:44:27] Civ. class 10 loaded
[12:44:27] Loaded 3 vehicles from: vehicles/trains.txt
[12:44:27] Loaded 3 vehicles from: vehicles/pilots.txt
[12:44:27] Loaded 15 vehicles from: vehicles/lv_law.txt
[12:44:27] Loaded 39 vehicles from: vehicles/lv_airport.txt
[12:44:27] Loaded 255 vehicles from: vehicles/lv_gen.txt
[12:44:27] Loaded 38 vehicles from: vehicles/sf_law.txt
[12:44:27] Loaded 35 vehicles from: vehicles/sf_airport.txt
[12:44:27] Loaded 353 vehicles from: vehicles/sf_gen.txt
[12:44:27] Loaded 24 vehicles from: vehicles/ls_law.txt
[12:44:27] Loaded 37 vehicles from: vehicles/ls_airport.txt
[12:44:27] Loaded 98 vehicles from: vehicles/ls_gen_inner.txt
[12:44:27] Loaded 389 vehicles from: vehicles/ls_gen_outer.txt
[12:44:27] Loaded 71 vehicles from: vehicles/whetstone.txt
[12:44:27] Loaded 168 vehicles from: vehicles/bone.txt
[12:44:27] Loaded 61 vehicles from: vehicles/flint.txt
[12:44:27] Loaded 96 vehicles from: vehicles/tierra.txt
[12:44:27] Loaded 96 vehicles from: vehicles/red_county.txt
[12:44:27] Loading vehicles from files done.
[12:44:27] Ped Anims Initialized.
[12:44:27] Vehicles Respawned

OnPlayerRequestSpawn:

Quote:

[12:45:24] Player has requested spawn.

OnPlayerRequestClass:

Quote:

[12:45:21] Setplayerteamfromclass loaded
[12:45:21] Set player interior set to id 3
[12:45:21] Set player pos loaded
[12:45:21] Set player facing angle loaded
[12:45:21] Set player camera pos loaded
[12:45:21] Set player camera look at loaded
[12:45:21] Animation DANCING - DNCE_M_B applied

Nothing wrong found,every line has been debugged and printed,but i still can't fix.
Reply
#7

Based on your logs, I'm assuming you're using a file saving system? Perhaps you're missing a folder or your gamemode is trying to read from a file that doesn't exist.
Reply
#8

Quote:
Originally Posted by Joe Staff
Посмотреть сообщение
Based on your logs, I'm assuming you're using a file saving system? Perhaps you're missing a folder or your gamemode is trying to read from a file that doesn't exist.
I use Y_INI and no,every folder is there and it's fully working,that's not the problem.
Reply
#9

Bump.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)