AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to fix this "Run time error" (https://forums.alliedmods.net/showthread.php?t=275734)

iLlegalzp 12-07-2015 08:47

How to fix this "Run time error"
 
In the console i saw this

L 12/07/2015 - 15:28:13: [AMXX] Displaying debug trace (plugin "zp_darkness_zpa.amxx")
L 12/07/2015 - 15:28:13: [AMXX] Run time error 10: native error (native "zp_get_user_zombie")
L 12/07/2015 - 15:28:13: [AMXX] [0] zp_darkness_zpa.sma::lighting_a (line 223)

this code is from line 222 to 225

PHP Code:

    // Add ability health to Zombies
    
if(zp_get_user_zombie(id) || get_pcvar_num(pcv_darkness_zombie_ability)) {
        
set_user_health(idget_user_health(id)+get_pcvar_num(pcv_darkness_give_health))
    } 


zmd94 12-07-2015 11:11

Re: How to fix this "Run time error"
 
Code:

    // Add ability health to Zombies
    if(zp_get_user_zombie(id) || get_pcvar_num(pcv_darkness_zombie_ability)) {
        set_user_health(id, get_user_health(id)+get_pcvar_num(pcv_darkness_give_health))
    }

-->
Code:

    // Add ability health to Zombies
    if(is_user_alive(id) && zp_get_user_zombie(id) || get_pcvar_num(pcv_darkness_zombie_ability)) {
        set_user_health(id, get_user_health(id)+get_pcvar_num(pcv_darkness_give_health))
    }


iLlegalzp 12-07-2015 11:43

Re: How to fix this "Run time error"
 
When i tried to compile the .sma file i got this warning (yes i know so this is only warning but i want to be fix :cry: )

//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// zp_darkness_zpa.sma
// D:\MOD\cstrike\addons\amxmodx\scripting\zp_da rkness_zpa.sma(223) : warning 217: loose indentation
// Header size: 1452 bytes
// Code size: 11160 bytes
// Data size: 6988 bytes
// Stack/heap size: 16384 bytes; max. usage is unknown, due to recursion
// Total requirements: 35984 bytes
//
// 1 Warning.
// Done.
//
// Compilation Time: 0,34 sec
// ----------------------------------------

Press enter to exit ...

milutinke 12-07-2015 14:57

Re: How to fix this "Run time error"
 
Quote:

Originally Posted by iLlegalzp (Post 2369640)
When i tried to compile the .sma file i got this warning (yes i know so this is only warning but i want to be fix :cry: )

//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// zp_darkness_zpa.sma
// D:\MOD\cstrike\addons\amxmodx\scripting\zp_da rkness_zpa.sma(223) : warning 217: loose indentation
// Header size: 1452 bytes
// Code size: 11160 bytes
// Data size: 6988 bytes
// Stack/heap size: 16384 bytes; max. usage is unknown, due to recursion
// Total requirements: 35984 bytes
//
// 1 Warning.
// Done.
//
// Compilation Time: 0,34 sec
// ----------------------------------------

Press enter to exit ...

Use TAB instead of space
Your code aligment is not good

iLlegalzp 12-07-2015 15:15

Re: How to fix this "Run time error"
 
If i upload the code would you fix it ?

milutinke 12-07-2015 15:48

Re: How to fix this "Run time error"
 
Yes

iLlegalzp 12-07-2015 15:53

Re: How to fix this "Run time error"
 
-DELETED-


All times are GMT -4. The time now is 18:01.

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