Raised This Month: $ Target: $400
 0% 

#defined stuff needs to be splitted?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bibu
Veteran Member
Join Date: Sep 2010
Old 07-16-2011 , 06:02   #defined stuff needs to be splitted?
Reply With Quote #1

This doesn't compile for me:

PHP Code:
            if( !( iFlags FL_ONGROUND )
            
#if defined DUCK
            
&& ( iFlags FL_DUCKING ) )
            
#else
            
&& get_user_buttoniToucher ) & IN_USE )
            
#endif 
But the exactly same code, like this, does:

PHP Code:
            #if defined DUCK
            
if( !( iFlags FL_ONGROUND )
            && ( 
iFlags FL_DUCKING ) )
            
#else
            
if( !( iFlags FL_ONGROUND )
            && 
get_user_buttoniToucher ) & IN_USE )
            
#endif 
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-16-2011 , 06:17   Re: #defined stuff needs to be splitted?
Reply With Quote #2

Put the last ")" out of the defines statements.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 07-16-2011 , 07:31   Re: #defined stuff needs to be splitted?
Reply With Quote #3

This won't help me, still would not compile, I made it like this, but still doesn't work:

PHP Code:
            if( !( iFlags FL_ONGROUND ) )
            
#if defined DUCK
            
&& ( iFlags FL_DUCKING ) )
            
#else
            
&&  ( get_user_buttoniToucher ) & IN_USE )
            
#endif 
Last line got:

Quote:
Error: Invalid expression, assumed zero.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-16-2011 , 08:53   Re: #defined stuff needs to be splitted?
Reply With Quote #4

You have an extra ")" on first line...
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 07-16-2011 , 09:52   Re: #defined stuff needs to be splitted?
Reply With Quote #5

Forget it.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 07-16-2011 , 10:26   Re: #defined stuff needs to be splitted?
Reply With Quote #6

Forget it meaning you solved it or forget it because he didn't understand ?

EDIT: oh nvm, my bad xD
__________________

Last edited by Hunter-Digital; 07-16-2011 at 12:13.
Hunter-Digital is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 07-16-2011 , 10:48   Re: #defined stuff needs to be splitted?
Reply With Quote #7

Quote:
Originally Posted by Hunter-Digital View Post
forget it because he is telling the same and it doesn't work
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
rhelgeby
Veteran Member
Join Date: Oct 2008
Location: 0x4E6F72776179
Old 07-16-2011 , 10:59   Re: #defined stuff needs to be splitted?
Reply With Quote #8

What about this?

PHP Code:
            if( !( iFlags FL_ONGROUND )
            
#if defined DUCK
            
&& ( iFlags FL_DUCKING )
            
#else
            
&& get_user_buttoniToucher ) & IN_USE
            
#endif
            

__________________
Richard Helgeby

Zombie:Reloaded | PawnUnit | Object Library
(Please don't send private messages for support, they will be ignored. Use the forum.)
rhelgeby is offline
Send a message via MSN to rhelgeby
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-16-2011 , 10:39   Re: #defined stuff needs to be splitted?
Reply With Quote #9

I tried too without success, it may not be syntactically possible.
__________________
Bugsy is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 07-16-2011 , 14:02   Re: #defined stuff needs to be splitted?
Reply With Quote #10

Nope...

I think I will leave it how I made it in my first post. Maybe bugsy is right about that.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu 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 01:08.


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