AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hud Error (https://forums.alliedmods.net/showthread.php?t=121433)

DoviuX 03-15-2010 16:01

Hud Error
 
I got a problem with human classes when hud has to show their class:

Hlds error:

Code:

L 03/15/2010 - 21:57:42: Function is not present (function "Task_Showclass") (plugin "zombie_swarm.amxx")
L 03/15/2010 - 21:57:42: [AMXX] Displaying debug trace (plugin "zombie_swarm.amxx")
L 03/15/2010 - 21:57:42: [AMXX] Run time error 10: native error (native "set_task")
L 03/15/2010 - 21:57:42: [AMXX]    [0] zombie_swarm.sma::bacon_spawn (line 706)

706 Line:

PHP Code:

        if(!task_exists(TASKID_SHOWHUD id))
            
set_task(0.2"Task_Showclass"TASKID_SHOWHUD id

But i can't define another one becouse there is one for zombie classes what should i do that hud show human class to CT ?

wrecked_ 03-15-2010 16:04

Re: Hud Error
 
What? It tells you in the error log. You're not putting in a function called "Task_showclass".

ConnorMcLeod 03-15-2010 16:14

Re: Hud Error
 
Make sure the case is the same, you may have put Task_Showclass in set_task native and named the callback Task_ShowClass for example, or you may just forgot to put the callback.

DoviuX 03-15-2010 16:17

Re: Hud Error
 
Another error when i fixed;
Code:

L 03/15/2010 - 22:15:12: [AMXX] Displaying debug trace (plugin "zombie_swarm.amxx")
L 03/15/2010 - 22:15:12: [AMXX] Run time error 4: index out of bounds
L 03/15/2010 - 22:15:12: [AMXX]    [0] zombie_swarm.sma::Task_ShowClass (line 1495)

Code:
PHP Code:

public Task_ShowClass(id)
{
    
set_hudmessage(25518000.010.9000.00.30.00.0)
    
ShowSyncHudMsg(idg_hudsync "Class: %s "humanclassnames[PlayerClass[id]])

    
set_task(0.1"Task_ShowClass"TASKID_SHOWHUD id)    

    return 
PLUGIN_CONTINUE



Seta00 03-15-2010 16:40

Re: Hud Error
 
PlayerClass[id] is larger than the humanclassnames array.


All times are GMT -4. The time now is 08:43.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.