Raised This Month: $ Target: $400
 0% 

Help with this script...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-12-2005 , 08:14   Help with this script...
Reply With Quote #1

ok... i'm trying to make a new mod but some errors
it says
Code:
L 11/12/2005 - 13:59:38: [AMXX] Run time error 4: index out of bounds (array "PlayerLevel[33]") (indexed "[28]")
L 11/12/2005 - 13:59:38: [AMXX]    [0] LOTR.sma::ShowHUD (line 359)
L 11/12/2005 - 13:59:40: [AMXX] Displaying debug trace (plugin "LOTR.amxx")
L 11/12/2005 - 13:59:40: [AMXX] Run time error 4: index out of bounds (array "PlayerLevel[33]") (indexed "[79]")
L 11/12/2005 - 13:59:40: [AMXX]    [0] LOTR.sma::ShowHUD (line 359)
L 11/12/2005 - 13:59:44: [AMXX] Displaying debug trace (plugin "LOTR.amxx")
L 11/12/2005 - 13:59:44: [AMXX] Run time error 4: index out of bounds (array "PlayerLevel[33]") (indexed "[80]")
lots of these...
also I dunno, but I think I don't get xp, and I get levels all the time...
[ --<-@ ] Black Rose is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-12-2005 , 12:20  
Reply With Quote #2

Maybe PlayerLevel[id] + 1 is more than MAXLEVELS?
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-12-2005 , 14:41  
Reply With Quote #3

in ShowHUD?
[ --<-@ ] Black Rose is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-12-2005 , 16:06  
Reply With Quote #4

Yes.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-13-2005 , 05:41  
Reply With Quote #5

here it is
Code:
public ShowHUD(id) {     new HUD[512]     new NextLevelXP = LEVELS[PlayerLevel[id]+1]     format(HUD, 511, "[%s] Level: %i XP: %i / %i", CLASSES[PlayerClass[id]], PlayerLevel[id], PlayerXP[id], NextLevelXP)     message_begin(MSG_ONE, msgtext, {0,0,0}, id)     write_byte(0)     write_string(HUD)     message_end()     return PLUGIN_HANDLED }
i know u have to do something bout level 10 in this thing...
Code:
new NextLevelXP = LEVELS[PlayerLevel[id]+1]
but that doesn't matter. I don't think thats the problem...if the level was 10 then indexed would be 11, right? so the prob is that I am gaining levels all the time and i don't know why... and it starts at lvl 1. i want it to start at lvl 0...
[ --<-@ ] Black Rose is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-13-2005 , 12:53  
Reply With Quote #6

Try this:

Code:
 public ShowHUD(id) {     client_print(id,print_chat,"* %d/%d",PlayerLevel[id]+1,MAXLEVELS);     new HUD[512]     new NextLevelXP = LEVELS[PlayerLevel[id]+1]     format(HUD, 511, "[%s] Level: %i XP: %i / %i", CLASSES[PlayerClass[id]], PlayerLevel[id], PlayerXP[id], NextLevelXP)     message_begin(MSG_ONE, msgtext, {0,0,0}, id)     write_byte(0)     write_string(HUD)     message_end()     return PLUGIN_HANDLED }

See if the first number ever exceeds the second number.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
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 23:59.


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