Raised This Month: $ Target: $400
 0% 

[HELP] Blanks can only be added after items.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 06-28-2014 , 11:40   [HELP] Blanks can only be added after items.
Reply With Quote #1

Fixed

Last edited by Fuck For Fun; 07-06-2014 at 12:50. Reason: Solved
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 06-28-2014 , 12:55   Re: [HELP] Blanks can only be added after items.
Reply With Quote #2

Your loops, where you add blank and the items, are wrong. And the compiler says it itself.
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 06-28-2014 , 16:12   Re: [HELP] Blanks can only be added after items.
Reply With Quote #3

You always have to add an item first before adding a blank using menu_addblank. The code you have provided should not trigger this behavior since you always use menu_additem first before reaching menu_addblank.
__________________
In Flames we trust!
Nextra is offline
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 06-28-2014 , 18:44   Re: [HELP] Blanks can only be added after items.
Reply With Quote #4

Quote:
Originally Posted by Flick3rR View Post
Your loops, where you add blank and the items, are wrong. And the compiler says it itself.
Quote:
Originally Posted by Nextra View Post
You always have to add an item first before adding a blank using menu_addblank. The code you have provided should not trigger this behavior since you always use menu_additem first before reaching menu_addblank.
Look good on the stock Cmd MakeShop
menu_additem and blank
Can you answer my questions - 192 characters

Last edited by Fuck For Fun; 06-28-2014 at 18:46.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 06-28-2014 , 22:38   Re: [HELP] Blanks can only be added after items.
Reply With Quote #5

Quote:
Originally Posted by Fuck For Fun View Post
Can you answer my questions - 192 characters
It doesn't matter for this problem, the menu system doesn't care how large the array is. You will probably never use display text longer than 63 characters, so you can reduce the size to 64 if you like.
__________________
In Flames we trust!
Nextra is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 06-28-2014 , 18:52   Re: [HELP] Blanks can only be added after items.
Reply With Quote #6

You.don't really need 192. That's too many. Simply explained - this shows how many characters can you have in your string (inthat case)(it could be array also). Usually, you may use 32 or 64 for titles.
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 06-30-2014 , 10:59   Re: [HELP] Blanks can only be added after items.
Reply With Quote #7

How will I know how to set up?
50 It is good to this menu?
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 06-30-2014 , 12:40   Re: [HELP] Blanks can only be added after items.
Reply With Quote #8

Yes. You have to understand one: the size you put in these brackets after the variable defines how many letters could there be in this string (in that case it is the menu title). If you won't use more than 63, you can put 64. These numbers like 32, 64, 128, etc., are mostly used, because hey are multiples of 2 (it's a principle in the programming).
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 06-30-2014 , 15:52   Re: [HELP] Blanks can only be added after items.
Reply With Quote #9

Oh it is based on the amount of letters.
Code:
formatex( szMenu, charsmax( szMenu ), "\r[%s] \yShop Main Menu^n\wYou have \y%i \wcash"
So I will set 64?
Code:
static szMenu[ 64 ]
What is the difference between static to new
Has been explained to me the other day, but for you what is useful for me here on the menu?

Last edited by Fuck For Fun; 06-30-2014 at 15:53.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 07-01-2014 , 06:21   Re: [HELP] Blanks can only be added after items.
Reply With Quote #10

The menu does not care about what your variable is, it just cares about what string is inside it. It doesn't care wether the variable is declared new or static. Static is not needed for this function.
__________________
In Flames we trust!
Nextra 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:05.


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