29.06.2017, 00:32
I'm trying to connect some Bots to the Server with a Timer but it keeps crashing.
Can someone help me with that?
OnFilterScriptInit:
Forward & Public:
Serverlog:
Can someone help me with that?
OnFilterScriptInit:
Код:
public OnFilterScriptInit()
{
RNPC_SetUpdateRate(80);
MapAndreas_Init(MAP_ANDREAS_MODE_NOBUFFER);
new count = 0;
for(new npcid = 0; npcid < MAX_ZOMBIES; npcid++)
{
new name[24];
format(name, sizeof(name), ZOMBIE_NAME, npcid + 1);
SetTimerEx("SpawnZombie", 1000, false, "s", name);
count++;
}
printf("Number of zombies created: %i", count);
SetTimer("OnZombieAttack", 1000, true);
SetTimer("OnZombieRoam", 10000, true);
return 1;
}
Код:
forward SpawnZombie(name[]);
public SpawnZombie(name[])
{
ConnectRNPC(name);
return 1;
}
Код:
[01:12:19] [01:12:19] Filterscripts [01:12:19] --------------- [01:12:19] Loading filterscript 'zombietest.amx'... [01:12:20] [debug] Server crashed while executing zombietest.amx [01:12:20] [debug] AMX backtrace: [01:12:20] [debug] #0 native SetTimerEx () from samp-server.exe [01:12:20] [debug] #1 00003224 in public OnFilterScriptInit () from zombietest.amx [01:12:20] [debug] Native backtrace: [01:12:20] [debug] #0 0048288c in ?? () from samp-server.exe [01:12:20] [debug] #1 00473919 in ?? () from samp-server.exe [01:12:20] [debug] #2 004010b6 in ?? () from samp-server.exe [01:12:20] [debug] #3 6cb5d60a in ?? () from plugins\crashdetect.DLL [01:12:20] [debug] #4 6cb64078 in ?? () from plugins\crashdetect.DLL [01:12:20] [debug] #5 6cb5a767 in ?? () from plugins\crashdetect.DLL [01:12:20] [debug] #6 6cb5d65a in ?? () from plugins\crashdetect.DLL [01:12:20] [debug] #7 6cae4629 in ?? () from plugins\streamer.DLL [01:12:20] [debug] #8 0046a958 in ?? () from samp-server.exe


