SA-MP Forums Archive
[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:17filterscripts ""  (string)
[
19:57:17
[
19:57:17Server Plugins
[19:57:17] --------------
[
19:57:17]  Loading plugincrashdetect.dll
[19:57:17]   CrashDetect v4.18 is OK.
[
19:57:17]   Loaded.
[
19:57:17]  Loading pluginstreamer.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:17Filterscripts
[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:17SERVERLeft4Dead Deathmatch Server (0.3.7)
[
19:57:17GAME MODEDeathmatch
[19:57:17VERSIONVersion (1.0)
[
19:57:17MAX PLAYER SLOTS20
[19:57:17WEBSITEComming Soon
[19:57:17Number of vehicle models0
[19:57:18] [debugRun time error 4"Array index out of bounds"
[19:57:18] [debugAMX backtrace:
[
19:57:18] [debug#0 00038fa8 in public HideGameTextTime (100) from 1v1.amx
[19:57:19] [debugRun time error 4"Array index out of bounds"
[19:57:19] [debugAMX backtrace:
[
19:57:19] [debug#0 00038fa8 in public HideGameTextTime (100) from 1v1.amx
[19:57:20] [debugRun time error 4"Array index out of bounds"
[19:57:20] [debugAMX backtrace:
[
19:57:20] [debug#0 00038fa8 in public HideGameTextTime (100) from 1v1.amx 
PHP код:
public OnGameModeInit()
{
    
DMGameTextTimer SetTimerEx("HideGameTextTime"10001"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(playeridGameText[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 017undefined 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 0playerid MAX_PLAYERSplayerid++)
    {
    
DMGameTextTimer SetTimerEx("HideGameTextTime"10001"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