AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Help] plz run time error 4 (https://forums.alliedmods.net/showthread.php?t=130584)

vato loco [GE-S] 06-25-2010 08:49

[Help] plz run time error 4
 
hi never regonized this error befor look yesterday in logs
and saw this error !!! somthin with array wrong ??

this is the error line
PHP Code:

 if(!is_plr_alive[id]) 

PHP Code:

new is_plr_alive[33]

public 
fw_UseButton(iEntid)
{
    if(!
iEnt || id 32)
        return 
FMRES_IGNORED
    
    
if(!is_plr_alive[id])
        return 
FMRES_IGNORED


can it be that i must use it like this
PHP Code:

if(!is_plr_alive[id-1]) 


RedRobster 06-25-2010 08:51

Re: [Help] plz run time error 4
 
I have no idea what you just asked. But, put debug after the plugin name in your plugins.ini and copy and paste that error here.

GXLZPGX 06-25-2010 08:54

Re: [Help] plz run time error 4
 
Quote:

Originally Posted by vato loco [GE-S] (Post 1219344)
hi never regonized this error befor look yesterday in logs
and saw this error !!! somthin with array wrong ??
PHP Code:

new is_plr_alive[33

this is the error
PHP Code:

if(!is_plr_alive[id])public fw_UseButton(iEntid)
{
    if(!
iEnt || id 32)
        return 
FMRES_IGNORED
    
if(!is_plr_alive[id])
        return 
FMRES_IGNORED


can it be that i must use it like this
PHP Code:

if(!is_plr_alive[id-1]) 


First of all, don't make your own array for that.. use:

!is_player_alive(id)

vato loco [GE-S] 06-25-2010 08:57

Re: [Help] plz run time error 4
 
i have already debug mode on but i delet the log file hehe

and change for testing this
PHP Code:

if(!is_plr_alive[id-1]) 

and till now no error log but it can still happen
because change it maybe 20 min ago

vato loco [GE-S] 06-25-2010 08:59

Re: [Help] plz run time error 4
 
@ GXLZPGX

do you want to say it's better in this case to use
PHP Code:

!is_user_alive(id

i'm using is_plr_alive[id] in my whole plugin

only this line up make probs

GXLZPGX 06-25-2010 09:05

Re: [Help] plz run time error 4
 
Quote:

Originally Posted by vato loco [GE-S] (Post 1219353)
@ GXLZPGX

do you want to say it's better in this case to use
PHP Code:

!is_user_alive(id

i'm using is_plr_alive[id] in my whole plugin

only this line up make probs

Its worth a try.

vato loco [GE-S] 06-25-2010 09:17

Re: [Help] plz run time error 4
 
it seem to be the most easyest way to solve the problem :wink:


All times are GMT -4. The time now is 14:51.

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