Raised This Month: $ Target: $400
 0% 

Surf xp


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Snitch
Veteran Member
Join Date: Sep 2013
Location: Kazakhstan
Old 07-14-2014 , 18:42   Surf xp
Reply With Quote #1

Solved

Last edited by Snitch; 09-21-2014 at 10:55. Reason: Solved
Snitch is offline
Send a message via Skype™ to Snitch
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 07-15-2014 , 04:05   Re: Surf xp
Reply With Quote #2

Look, you have to define maxkevels which are 6. Then set a size tonthe constants with the define (so there won't be anny mismatches). Your while loop is not correct. You have to "while" it like this:
PHP Code:
while(gLvl[Atkr] < MAXLEVELS 1){
      if(
gExp[Atkr] > Levels[gLvl[Atkr]])
             
//Plyer leveled up
      
else break

__________________

Last edited by Flick3rR; 07-15-2014 at 04:11.
Flick3rR is offline
Send a message via Skype™ to Flick3rR
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-15-2014 , 06:12   Re: Surf xp
Reply With Quote #3

Quote:
Originally Posted by Flick3rR View Post
Look, you have to define maxkevels which are 6. Then set a size tonthe constants with the define (so there won't be anny mismatches). Your while loop is not correct. You have to "while" it like this:
PHP Code:
while(gLvl[Atkr] < MAXLEVELS 1){
      if(
gExp[Atkr] > Levels[gLvl[Atkr]])
             
//Plyer leveled up
      
else break

Why hardcode it ? Use sizeof.....

Last edited by HamletEagle; 07-15-2014 at 06:13.
HamletEagle is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 07-15-2014 , 09:02   Re: Surf xp
Reply With Quote #4

Well,because he is using more than one constants and they all have to be with the same size. I think he has to use enum and put all the data in one constant, or define one certain size for all constants (so there won't be size mismatches and other rank for other level, etc. I don't know how to express it right). And practiculary, he will use that defined size as a size of all constants. It's like a size marker. I don't know if I explained it right....
__________________

Last edited by Flick3rR; 07-15-2014 at 09:03.
Flick3rR is offline
Send a message via Skype™ to Flick3rR
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-15-2014 , 09:36   Re: Surf xp
Reply With Quote #5

If he want that plugin to be working, he need the same size for every constant, so there is no reason to hardcode it. Still, if define the max size and put more/less intems in a constant he won't be able to compile, and will ask here. Both ways will reach the same thing: a new topic here. An enum is not a must if you know how to count.

Last edited by HamletEagle; 07-15-2014 at 09:37.
HamletEagle is offline
Snitch
Veteran Member
Join Date: Sep 2013
Location: Kazakhstan
Old 07-15-2014 , 13:19   Re: Surf xp
Reply With Quote #6

I have no idea what you're talking ..

Please you can fix me the code?
Snitch is offline
Send a message via Skype™ to Snitch
xDoctor
Member
Join Date: Jul 2013
Old 07-16-2014 , 00:47   Re: Surf xp
Reply With Quote #7

Quote:
Originally Posted by Snitch View Post
I have no idea what you're talking ..

Please you can fix me the code?

nvm you edited the code.

Last edited by xDoctor; 07-16-2014 at 00:47.
xDoctor 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 21:11.


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