Raised This Month: $ Target: $400
 0% 

Little help with debug


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sp4rt4n
Senior Member
Join Date: Dec 2004
Old 08-25-2005 , 17:36   Little help with debug
Reply With Quote #1

ok, this plugin compiles with no warnings, no errors, and runs fine, but in the server console, i get these two things:

'invalid player 1' on line 2424, heres the function with line 2424 in it, the set_user_hitzones line is the error line:

Code:
public evade_loop() {     if (!Dragoneye()) return     for (new a = 1; a <= PLAYERS; a++) {         if (assassin[a] && pskills5[a] > 0 && automagic[a][ AMid[a] ] == 12 && is_user_alive(a) && get_user_armor(a) >= 1) {             set_evade(a)             set_user_armor(a, get_user_armor(a) - 1)         }         else {             set_user_hitzones(0, a, 255)         }     } }

and i get 'invalid player id 24' on line 1558, heres the function, the new clip, ammo (etc) line is the error line:

Code:
public check_speed() {     for (new s = 1; s <= PLAYERS; s++) {                 new clip, ammo, wpnid = get_user_weapon(s,clip,ammo)         if (is_user_alive(s) && Dragoneye()) {             if (frozen[s][0] == 1 && is_user_alive(s) && frozen[s][1] > 0) {                 new freezer = frozen[s][1]                 set_user_maxspeed(s, maxSpeed[s] - pskills2[freezer] * 40)                 render_user(s,0,20,40)                      }             else if (frozen[s][0] == 1 && is_user_alive(s) && frozen[s][1] == -1) {                 set_user_maxspeed(s, maxSpeed[s] - 100)                 render_user(s,0,20,40)             }             else if (frozen[s][0] == 1 && is_user_alive(s) && frozen[s][1] == -2) {                 set_user_maxspeed(s, maxSpeed[s] - 80)                 render_user(s,0,20,40)             }             else if (frozen[s][0] == 0 && wpnid == CSW_KNIFE && is_user_alive(s) && assassin[s] && maxSpeed[s] > 210.0) {                 set_user_maxspeed(s, maxSpeed[s])                 render_user_off(s)             }             else if (frozen[s][0] == 0 && wpnid != CSW_KNIFE && is_user_alive(s) && assassin[s] && maxSpeed[s] > 210.0) {                 set_user_maxspeed(s, maxSpeed[s] - 20)                 render_user_off(s)             }             else if (inBerserk[s]) {                 set_user_maxspeed(s, maxSpeed[s] + 50)             }         }     } }

can someone please help me? its the dragoneye plugin i ported if you want the full source
Sp4rt4n is offline
Send a message via MSN to Sp4rt4n
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 08-25-2005 , 17:41  
Reply With Quote #2

Quote:
'invalid player 1' on line 2424, heres the function with line 2424 in it, the set_user_hitzones line is the error line:

Small:

public evade_loop() {

if (!Dragoneye()) return

for (new a = 1; a <= PLAYERS; a++) {
if (assassin[a] && pskills5[a] > 0 && automagic[a][ AMid[a] ] == 12 && is_user_alive(a) && get_user_armor(a) >= 1) {
set_evade(a)
set_user_armor(a, get_user_armor(a) - 1)
}
else {
set_user_hitzones(0, a, 255)
}
}
}
add

Code:
if(!is_user_connected(a)) continue
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Sp4rt4n
Senior Member
Join Date: Dec 2004
Old 08-25-2005 , 18:00  
Reply With Quote #3

well, i did it... but i am now getting 2 warnings and the errors in the server are still coming up. heres the source and include file without what i did, maybe someone could work with it?
Attached Files
File Type: inc dragoneye.inc (865 Bytes, 99 views)
File Type: sma Get Plugin or Get Source (dragoneye.sma - 526 views - 97.9 KB)
Sp4rt4n is offline
Send a message via MSN to Sp4rt4n
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 08-25-2005 , 20:08  
Reply With Quote #4

Okay, I put the functions from dragoneye.inc into dragoneye.sma (there were so few and extra includes is a pain), added defines for classes (CLASS_NECRO, CLASS_PALLY, CLASS_MAGE, CLASS_ASSN), as get_user_class returns an integer and not a string, and changed cs_user_spawn (amxmod function) to spawn (amxmodx function).

EDIT: files removed
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS

Last edited by XxAvalanchexX; 04-16-2007 at 01:19.
XxAvalanchexX is offline
Sp4rt4n
Senior Member
Join Date: Dec 2004
Old 08-25-2005 , 21:05  
Reply With Quote #5

thank you avalance, your a genius
Sp4rt4n is offline
Send a message via MSN to Sp4rt4n
Reply



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 14:18.


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