Raised This Month: $ Target: $400
 0% 

formatex or format [SOLVED]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
modernwarfare
Senior Member
Join Date: Aug 2011
Location: sweden
Old 09-25-2011 , 07:06   formatex or format [SOLVED]
Reply With Quote #1

Hey guys i have been reading the wiki

but i dont really really understand

like

do i use

Code:
    iPos += formatex(szMotd[iPos], 2047-iPos, "%L" , id , "HELP11", Health_PerLevel)
    iPos += formatex(szMotd[iPos], 2047-iPos, "%L" , id , "HELP12", Armor_PerLevel)
    iPos += formatex(szMotd[iPos], 2047-iPos, "%L" , id , "HELP13", Speed_PerLevel)
    iPos += formatex(szMotd[iPos], 2047-iPos, "%L" , id , "HELP14", Regeneration_PerLevel)
    iPos += formatex(szMotd[iPos], 2047-iPos, "%L" , id , "HELP15", floatround((Gravity_PerLevel * 100)))
or do i need

Code:
    iPos += format(szMotd[iPos], 2047-iPos, "%L" , id , "HELP11", Health_PerLevel)
    iPos += format(szMotd[iPos], 2047-iPos, "%L" , id , "HELP12", Armor_PerLevel)
    iPos += format(szMotd[iPos], 2047-iPos, "%L" , id , "HELP13", Speed_PerLevel)
    iPos += format(szMotd[iPos], 2047-iPos, "%L" , id , "HELP14", Regeneration_PerLevel)
    iPos += format(szMotd[iPos], 2047-iPos, "%L" , id , "HELP15", floatround((Gravity_PerLevel * 100)))
and onther question

what happend if i put the formatex in a code that needs format?

do it use the format or its just ignore that code?

and thx

explain more for me because the approver has unapproved my plugin

because of this thing and some more things

and thx
__________________
Im supporting/coding XP Mod Plugin
Free Palestine
R.I.P. The 2967 American people that lost their lives 9/11 and R.I.P.
The 48,644 Afghan and 1,690,903 Iraqi people that paid the ultimate price for a crime they did not commit.




Last edited by modernwarfare; 09-25-2011 at 10:48.
modernwarfare is offline
Send a message via MSN to modernwarfare Send a message via Skype™ to modernwarfare
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 09-25-2011 , 07:10   Re: formatex or format
Reply With Quote #2

http://www.amxmodx.org/funcwiki.php?...atex&go=search
__________________
hleV is offline
modernwarfare
Senior Member
Join Date: Aug 2011
Location: sweden
Old 09-25-2011 , 07:19   Re: formatex or format
Reply With Quote #3

i have readed that

like if i save with nvault and its format

cant i use formatex?
__________________
Im supporting/coding XP Mod Plugin
Free Palestine
R.I.P. The 2967 American people that lost their lives 9/11 and R.I.P.
The 48,644 Afghan and 1,690,903 Iraqi people that paid the ultimate price for a crime they did not commit.



modernwarfare is offline
Send a message via MSN to modernwarfare Send a message via Skype™ to modernwarfare
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 09-25-2011 , 07:24   Re: formatex or format
Reply With Quote #4

Quote:
Originally Posted by AMX Mod X Function Reference Search - formatex()
Same as format(), except does not perform a "copy back" check.
This means formatex() is faster, but DOES NOT ALLOW this type of call:
formatex(buffer, len, "%s", buffer)
formatex(buffer, len, buffer, buffer)
formatex(buffer, len, "%s", buffer[5])
This is because the output is directly stored into "buffer", rather than copied back at the end.
__________________
Achievements API - a simple way for you to create your OWN custom achievements!
Xellath is offline
modernwarfare
Senior Member
Join Date: Aug 2011
Location: sweden
Old 09-25-2011 , 07:42   Re: formatex or format
Reply With Quote #5

thx guys now i understand

but the approver said that i need to use cvar pointers

is that right:

Code:
          SAVEXP = register_cvar("SaveXP", "1")
          WELCOMEMSG = register_cvar("welcomemsg", "1")
          LVLUPMSG = register_cvar("lvlupmsg", "1")
          DEATHMATCH = register_cvar("Deathmatch", "1")
          UNLIMITEDAMMO = register_cvar("unlimitedammo", "1")
          SOUNDS = register_cvar("sounds", "1")
          NOBUY = register_cvar("nobuy", "1")
          UPGRADESSHOP = register_cvar("upgradesshop", "1")
          GUNSMENU = register_cvar("gunsmenu", "1")
__________________
Im supporting/coding XP Mod Plugin
Free Palestine
R.I.P. The 2967 American people that lost their lives 9/11 and R.I.P.
The 48,644 Afghan and 1,690,903 Iraqi people that paid the ultimate price for a crime they did not commit.



modernwarfare is offline
Send a message via MSN to modernwarfare Send a message via Skype™ to modernwarfare
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-25-2011 , 08:42   Re: formatex or format
Reply With Quote #6

register_cvar returns a pointer, something to be used with get_pcvar_*() functions.
__________________
Arkshine is offline
modernwarfare
Senior Member
Join Date: Aug 2011
Location: sweden
Old 09-25-2011 , 10:22   Re: formatex or format
Reply With Quote #7

Quote:
Originally Posted by Arkshine View Post
register_cvar returns a pointer, something to be used with get_pcvar_*() functions.

thx fixed

please lock

learned everything needed
__________________
Im supporting/coding XP Mod Plugin
Free Palestine
R.I.P. The 2967 American people that lost their lives 9/11 and R.I.P.
The 48,644 Afghan and 1,690,903 Iraqi people that paid the ultimate price for a crime they did not commit.



modernwarfare is offline
Send a message via MSN to modernwarfare Send a message via Skype™ to modernwarfare
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-25-2011 , 10:31   Re: formatex or format
Reply With Quote #8

There is nothing to lock.
__________________
Arkshine is offline
modernwarfare
Senior Member
Join Date: Aug 2011
Location: sweden
Old 09-25-2011 , 10:48   Re: formatex or format
Reply With Quote #9

Quote:
Originally Posted by Arkshine View Post
There is nothing to lock.

i mean lock the thread

because its solved
__________________
Im supporting/coding XP Mod Plugin
Free Palestine
R.I.P. The 2967 American people that lost their lives 9/11 and R.I.P.
The 48,644 Afghan and 1,690,903 Iraqi people that paid the ultimate price for a crime they did not commit.



modernwarfare is offline
Send a message via MSN to modernwarfare Send a message via Skype™ to modernwarfare
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 09-25-2011 , 10:54   Re: formatex or format [SOLVED]
Reply With Quote #10

Threads aren't locked because they were solved. People may find additional questions regarding the matter.
__________________
hleV is offline
Reply


Thread Tools
Display Modes

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 19:36.


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