Raised This Month: $ Target: $400
 0% 

[ Solved ] Problèm with a code


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-12-2012 , 13:37   Re: Problèm with a code
Reply With Quote #6

It's depending on the size of menu strings, it's good to keep them lowest as you can. In the tutorial they are a little bit higher... it's not really important, but it's good to keep memory low.
If you have something like this:

PHP Code:
menu_additem(menu,"Option","1"
Then it's better to set maximum characters of data to 2, because it contains only 1 character (you don't need more slots..., string "1" is 1 character, but it's lenght is 2 (0 + 1 reserved = 2)) and szName should be 7, because Option is 7 characters long (6 + 1 reserved). So it's good to keep these numbers as the size of the longest option strings. If we have another option that is longer than "Option" then it's better to write it's lenght and if you have a longer string as menu info, like -1, 10, 200, 1000 and so on, you can do the same with the data variable.

But it won't be a big problem if you leave them higher, like in the tutorial.
__________________

Last edited by <VeCo>; 05-12-2012 at 13:39.
<VeCo> 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 00:24.


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