Raised This Month: $32 Target: $400
 8% 

Solved Bitwise with enum


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 05-30-2020 , 12:14   Bitwise with enum
Reply With Quote #1

I was trying to use enum to setup bitwise for some custom ent flags but I got an error when compiling

Error
PHP Code:
Main_NPC.sma(45) : error 001expected token"{"but found "-label-" 
line 45-51:
PHP Code:
enum ( <<=1_ZOMBIE_FLAG
{
    
ZB_STATE_IDLE 1,
    
ZB_STATE_CAUTION,
    
ZB_STATE_ATTACKED,
    
ZB_STATE_CHASING

I copied the similair one from [TUT] Bits, Bit-fields, and Bit-wise Operators
How can I fix it? I am using Amx 1.10
__________________
My plugin:

Last edited by Celena Luna; 05-31-2020 at 00:19.
Celena Luna is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 05-30-2020 , 12:30   Re: Bitwise with enum
Reply With Quote #2

I'm not sure, but wouldn't it be?

PHP Code:
enum _ZOMBIE_FLAG ( <<=1)
{
    
ZB_STATE_IDLE 1,
    
ZB_STATE_CAUTION,
    
ZB_STATE_ATTACKED,
    
ZB_STATE_CHASING

__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 05-31-2020 , 00:19   Re: Bitwise with enum
Reply With Quote #3

Quote:
Originally Posted by iceeedr View Post
I'm not sure, but wouldn't it be?

PHP Code:
enum _ZOMBIE_FLAG ( <<=1)
{
    
ZB_STATE_IDLE 1,
    
ZB_STATE_CAUTION,
    
ZB_STATE_ATTACKED,
    
ZB_STATE_CHASING

OMG it work
Thank you so much
__________________
My plugin:
Celena Luna 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 13:37.


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