Raised This Month: $51 Target: $400
 12% 

[Fixed] Invalid player id, superheromod.sma - reloadAmmo


  
 
 
Thread Tools Display Modes
Author Message
badboyz
Member
Join Date: Dec 2005
Location: East Brunswick NJ
Old 09-16-2005 , 21:37   [Fixed] Invalid player id, superheromod.sma - reloadAmmo
#1

[AMXX] Invalid player id 0
[AMXX] Displaying call trace (plugin "cstrike\addons\amxmodx\plugins\superheromodv ault.amxx")
[AMXX] [0] superheromod.sma::reloadAmmo (line 2167)


Versions:
Amxmodx1.55
metamod 1.18
monstermod 3.0
Superhero version 1.18d cvs
badboyz is offline
Send a message via AIM to badboyz Send a message via MSN to badboyz
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 09-16-2005 , 23:29  
#2

You have a poorly coded hero that doesn't check if a user is connected when it uses SH no reload. Yay for bad scripters.


Thank you for supplying the full error, trashing the incomplete bug report of this same problem. Editing your subject line.
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 09-19-2005 , 18:57  
#3

I fixed this in my code but am not posting a cvs update for this little error. Here is the top of the function after being fixed.

Code:
public reloadAmmo() {     new szid[4], szdrop[4]     read_argv(1,szid,3)     read_argv(2,szdrop,3)     new id = str_to_num(szid)     new dropwpn = str_to_num(szdrop)     if (!is_user_connected(id)) return     if (gReloadTime[id] >= get_systime() - 1) return     gReloadTime[id] = get_systime()
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
badboyz
Member
Join Date: Dec 2005
Location: East Brunswick NJ
Old 09-21-2005 , 21:57   still get it
#4

"I Still get this Invalid player id error
Code:
L 09/21/2005 - 15:06:35: [AMXX] Invalid player id 0
L 09/21/2005 - 15:06:35: [AMXX] Displaying call trace (plugin "cstrike\addons\amxmodx\plugins\superheromodvault.amxx")
L 09/21/2005 - 15:06:35: [AMXX]    [0] superheromod.sma::reloadAmmo (line 2175)
after adding that function.
badboyz is offline
Send a message via AIM to badboyz Send a message via MSN to badboyz
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 09-21-2005 , 22:13  
#5

You need to compile it and put it on the server..... cause that line number you just gave doesn't even line up with anything that could cause that error in the source code you posted.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 09-21-2005 , 22:16  
#6

If you edited superheromod.sma with the above fix, it would fix the problem you are having.

This is probably where you messed up:
After compiling superheromod.sma, go to the compiled folder and rename it to superheromodvault.amxx. Then move the file to the plugins folder.

Because I bet your still trying to load the old superheromodvault.amxx and probably have an unused file with the fix in the plugins folder called superheromod.amxx.
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
badboyz
Member
Join Date: Dec 2005
Location: East Brunswick NJ
Old 09-24-2005 , 18:05   hey
#7

After I added that new function, Im getting this run time error
Code:
Invalid player id 0
[AMXX] Displaying debug trace (plugin "superheromodvault.amxx")
[AMXX] Run time error 10: native error (native "get_weaponname")
[AMXX]    [0] superheromod.sma::reloadAmmo (line 2175)
badboyz is offline
Send a message via AIM to badboyz Send a message via MSN to badboyz
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 09-24-2005 , 18:15  
#8

did you change amxx versions? the debug output looks different.
Also its not really possible to get the "invalid player id 0" after applying the fix I posted.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
badboyz
Member
Join Date: Dec 2005
Location: East Brunswick NJ
Old 09-24-2005 , 19:05  
#9

yeah i changed the amxx version to 1.60
badboyz is offline
Send a message via AIM to badboyz Send a message via MSN to badboyz
v_one
Junior Member
Join Date: Oct 2005
Old 10-03-2005 , 21:32  
#10

thats the one i downloaded but i get that weapon error
v_one 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 01:41.


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