[debug] help - 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: [debug] help (
/showthread.php?tid=626892)
[debug] help -
JuzDoiT - 21.01.2017
PHP код:
----------
Loaded log file: "server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team
[19:57:17] filterscripts = "" (string)
[19:57:17]
[19:57:17] Server Plugins
[19:57:17] --------------
[19:57:17] Loading plugin: crashdetect.dll
[19:57:17] CrashDetect v4.18 is OK.
[19:57:17] Loaded.
[19:57:17] Loading plugin: streamer.dll
[19:57:17]
*** Streamer Plugin v2.8.2 by Incognito loaded ***
[19:57:17] Loaded.
[19:57:17] Loaded 2 plugins.
[19:57:17]
[19:57:17] Filterscripts
[19:57:17] ---------------
[19:57:17] Loaded 0 filterscripts.
[19:57:17]
[19:57:17]
[19:57:17]
[19:57:17] =======================================
[19:57:17] | |
[19:57:17] | YSI version 4.00.0001 |
[19:57:17] | By Alex "******" Cole |
[19:57:17] | |
[19:57:17] =======================================
[19:57:17]
[19:57:17] SERVER: Left4Dead Deathmatch Server (0.3.7)
[19:57:17] GAME MODE: Deathmatch
[19:57:17] VERSION: Version (1.0)
[19:57:17] MAX PLAYER SLOTS: 20
[19:57:17] WEBSITE: Comming Soon
[19:57:17] Number of vehicle models: 0
[19:57:18] [debug] Run time error 4: "Array index out of bounds"
[19:57:18] [debug] AMX backtrace:
[19:57:18] [debug] #0 00038fa8 in public HideGameTextTime (100) from 1v1.amx
[19:57:19] [debug] Run time error 4: "Array index out of bounds"
[19:57:19] [debug] AMX backtrace:
[19:57:19] [debug] #0 00038fa8 in public HideGameTextTime (100) from 1v1.amx
[19:57:20] [debug] Run time error 4: "Array index out of bounds"
[19:57:20] [debug] AMX backtrace:
[19:57:20] [debug] #0 00038fa8 in public HideGameTextTime (100) from 1v1.amx
PHP код:
public OnGameModeInit()
{
DMGameTextTimer = SetTimerEx("HideGameTextTime", 1000, 1, "d", "d");
return 1;
}
PHP код:
forward HideGameTextTime(playerid);
public HideGameTextTime(playerid)
{
if (PlayerInfo[playerid][pNewGameText] > 0)
{
PlayerInfo[playerid][pNewGameText] --;
if (PlayerInfo[playerid][pNewGameText] == 0)
{
TextDrawHideForPlayer(playerid, GameText[playerid]);
TextDrawSetString(GameText[playerid], " ");
}
}
return 1;
}
PHP код:
public OnGameModeExit()
{
KillTimer(DMGameTextTimer);
return 1;
}
Re: [debug] help -
Codeah - 21.01.2017
Instead of
Код:
SetTimerEx("HideGameTextTime", 1000, 1, "d", "d");
use
Код:
SetTimerEx("HideGameTextTime", 1000, 1, "d", playerid);
The last two arguments are
1. What type of data you want to transfer.
2. The data.
In this case you want to transfer an Integer (i or d) which is the player id (playerid)
The
wiki page will have more information about it.
Re: [debug] help -
JuzDoiT - 21.01.2017
PHP код:
public OnGameModeInit() No Playerid here
PHP код:
error 017: undefined symbol "playerid"
Re: [debug] help -
Codeah - 21.01.2017
Could you give me more information?
Re: [debug] help -
JuzDoiT - 21.01.2017
nothing fixxxed
PHP код:
for (new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
DMGameTextTimer = SetTimerEx("HideGameTextTime", 1000, 1, "d", playerid);
}
Re: [debug] help -
Yaa - 21.01.2017
you can't hide a textdraw while is not created.
also this function it's impossible
logic:
the players wasn't in server while gamemode init so that make no sense