Raised This Month: $32 Target: $400
 8% 

Solved Remove "-" in formatex


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wilianmaique
BANNED
Join Date: Nov 2016
Old 03-04-2017 , 19:36   Remove "-" in formatex
Reply With Quote #1

IMG: http://prntscr.com/eg4c7k

How do I remove this LESS?

CODE:

PHP Code:
formatex(szmenu299"%s \wPatente Menu^n^n\wConta: \r%s \w[OK]^n\wXP: \r%d^n\wPatente: \r%s^n^n\wObs: Falta \r+%d \wde XP para a Patente \r%s\w!"PREFIXaccountxMyXP[id], xRankNames[xMyLevel[id]], xMyXP[id] - xLevels[xMyLevel[id]], xRankNames[xMyLevel[id]+1]) 

Last edited by Arkshine; 11-23-2017 at 04:00. Reason: Solved
wilianmaique is offline
Send a message via Skype™ to wilianmaique
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-05-2017 , 00:22   Re: Remove "-" in formatex
Reply With Quote #2

What is the number supposed to be? My first thought would be that you are doing the math wrong. If that is the case then you probably need to change the order of subtraction.

If it is possible to get both negative and positive values from the calculation (and the math is actually correct) and you need to show only the positive value then you would use take the absolute value of the value with abs(). I doubt that this is the case though so I suggest just fixing your math.
__________________

Last edited by fysiks; 03-05-2017 at 00:23.
fysiks is online now
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-05-2017 , 07:59   Re: Remove "-" in formatex
Reply With Quote #3

I think it shows the XP needed for the next level, so:

PHP Code:
xMyXP[id] - xLevels[xMyLevel[id]] 
Simple math... turn them the other way around.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
wilianmaique
BANNED
Join Date: Nov 2016
Old 03-05-2017 , 10:04   Re: Remove "-" in formatex
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
What is the number supposed to be? My first thought would be that you are doing the math wrong. If that is the case then you probably need to change the order of subtraction.

If it is possible to get both negative and positive values from the calculation (and the math is actually correct) and you need to show only the positive value then you would use take the absolute value of the value with abs(). I doubt that this is the case though so I suggest just fixing your math.
The math is right, I just want to remove the minus symbol: -

Sorry for my bad english

Last edited by wilianmaique; 03-05-2017 at 10:04.
wilianmaique is offline
Send a message via Skype™ to wilianmaique
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-05-2017 , 10:39   Re: Remove "-" in formatex
Reply With Quote #5

Don't ignore my post. The math isn't right, it's backwards.
__________________

Last edited by OciXCrom; 03-05-2017 at 10:39.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
wilianmaique
BANNED
Join Date: Nov 2016
Old 03-05-2017 , 10:54   Re: Remove "-" in formatex
Reply With Quote #6

Quote:
Originally Posted by OciXCrom View Post
Don't ignore my post. The math isn't right, it's backwards.
I do not understand, my friend, I do not know how to speak English very well
wilianmaique is offline
Send a message via Skype™ to wilianmaique
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-05-2017 , 11:03   Re: Remove "-" in formatex
Reply With Quote #7

PHP Code:
xMyXP[id] - xLevels[xMyLevel[id]] 
===========>

PHP Code:
xLevels[xMyLevel[id]] - xMyXP[id
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
wilianmaique
BANNED
Join Date: Nov 2016
Old 03-05-2017 , 11:09   Re: Remove "-" in formatex
Reply With Quote #8

Quote:
Originally Posted by OciXCrom View Post
PHP Code:
xMyXP[id] - xLevels[xMyLevel[id]] 
===========>

PHP Code:
xLevels[xMyLevel[id]] - xMyXP[id
Thanks
wilianmaique is offline
Send a message via Skype™ to wilianmaique
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 03:05.


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