Raised This Month: $ Target: $400
 0% 

[ HELP ] Invalid Player (-1) ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 11-21-2015 , 08:32   [ HELP ] Invalid Player (-1) ?
Reply With Quote #1

I've got the following error:
Code:
L 11/21/2015 - 11:25:12: Start of error session.
L 11/21/2015 - 11:25:12: Info (map "cs_assault") (file "addons/amxmodx/logs/error_20151121.log")
L 11/21/2015 - 11:25:12: [ZP] Invalid Player (-1)
L 11/21/2015 - 11:25:12: [AMXX] Run time error 10 (plugin "zp_bot_addon_give_random_extras.amxx") (native "zp_force_buy_extra_item") - debug not enabled!
L 11/21/2015 - 11:25:12: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
I do not know what the problem is, how to fix?
Code:
#include < amxmodx > #include < zombieplague > new const VERSION[] = "1.0"; new g_max_players , g_has_extra[33] , cvar_give_extras_delay; public plugin_init() {     register_plugin("[ZP] Bot Addon: Give Random Extras", VERSION, "CrazY");     cvar_give_extras_delay = register_cvar("zp_give_extras_delay", "20.0");     g_max_players = get_maxplayers() } public zp_round_started()     set_task(get_pcvar_float(cvar_give_extras_delay), "GiveRandomExtraBot", 053, .flags="b"); public zp_round_ended() {     if (task_exists(053)) remove_task(053);     g_has_extra[0] = false; } public GiveRandomExtraBot() {     static iBotName[33], iBotsNum; iBotsNum = fnGetBot();     new BotID = fnGetRandomBot(random_num(1, iBotsNum));     get_user_name(BotID, iBotName, 32);     set_hudmessage(random(255), random(255), random(255), -1.0, 0.7, 1, 6.0, 1.1, 0.5, 0.5);     show_hudmessage(0, "O bot %s ganhou uma  M249 Para Machinegun", iBotName);     zp_force_buy_extra_item(BotID, zp_get_extra_item_id("M249 Para Machinegun"), 1);     g_has_extra[BotID] = true; } stock fnGetBot() {     new iBot, id;     for (id = 1; id <= g_max_players; id++)     {         if (is_user_bot(id) && is_user_connected(id)) iBot++;     }     return iBot; } stock fnGetRandomBot(target_index) {     new iBot, id;     for (id = 1; id <= g_max_players; id++)     {         if (is_user_bot(id) && is_user_connected(id) && !zp_get_user_zombie(id) && !zp_get_user_survivor(id) && !g_has_extra[id]) iBot++;         if (iBot == target_index)             return id;     }     return -1; }
__________________









Last edited by CrazY.; 11-21-2015 at 08:32.
CrazY. is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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