Raised This Month: $ Target: $400
 0% 

Case 10


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kard1nal
Senior Member
Join Date: Dec 2012
Location: Russia
Old 02-10-2013 , 04:59   Case 10
Reply With Quote #1

So.
I've been adding a new cases in my menu and it all was okey until I added case 10.
Now I've get an error:
PHP Code:
UJBM.sma(3410) : error 027invalid character constant //this is line case('10')
UJBM.sma(3410) : warning 215expression has no effect
UJBM
.sma(3410) : error 001expected token";"but found ":"
UJBM.sma(3421) : warning 209: function "ShopT" should return a value
UJBM
.sma(3422) : error 010invalid function or declaration 
Code:
Spoiler

Last edited by Kard1nal; 02-10-2013 at 05:01.
Kard1nal is offline
Send a message via Skype™ to Kard1nal
Unkolix
Veteran Member
Join Date: Sep 2012
Old 02-10-2013 , 05:18   Re: Case 10
Reply With Quote #2

Show us the case 10 please.
Unkolix is offline
Kard1nal
Senior Member
Join Date: Dec 2012
Location: Russia
Old 02-10-2013 , 05:31   Re: Case 10
Reply With Quote #3

Sure.

PHP Code:
formatex(optioncharsmax(option), "Спереть фонарик - \y%d $"get_pcvar_num(T_item_10))
menu_additem(menuoption"10"0
Kard1nal is offline
Send a message via Skype™ to Kard1nal
Old 02-10-2013, 06:15
Kard1nal
This message has been deleted by YamiKaitou. Reason: wait 14 days before you bump
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-10-2013 , 08:27   Re: Case 10
Reply With Quote #4

Use :

switch( item )

And start at 0

case 0:
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Kard1nal
Senior Member
Join Date: Dec 2012
Location: Russia
Old 02-10-2013 , 09:19   Re: Case 10
Reply With Quote #5

Thanks.
Can you explain me please why does it happen with switch(data[0])?

Last edited by Kard1nal; 02-10-2013 at 09:27.
Kard1nal is offline
Send a message via Skype™ to Kard1nal
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-10-2013 , 09:32   Re: Case 10
Reply With Quote #6

char is a char, like 0 to 9 or any letter, "10" is a string made with char '1' and char '0', so '10' is not a char.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 20:37.


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