Raised This Month: $ Target: $400
 0% 

Bitsum question


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 11-07-2020 , 03:35   Bitsum question
Reply With Quote #1

Hello,
I was wondering why compiler is throwing this errors:
PHP Code:
D:\Custom Projects\Zombie Apocalypse\scripting\Special_Project_ZA.1.0.sma(127 -- 128) : error 012invalid function callnot a valid address
D
:\Custom Projects\Zombie Apocalypse\scripting\Special_Project_ZA.1.0.sma(128) : error 001expected token";"but found ")"
D:\Custom Projects\Zombie Apocalypse\scripting\Special_Project_ZA.1.0.sma(128) : error 029invalid expressionassumed zero
D
:\Custom Projects\Zombie Apocalypse\scripting\Special_Project_ZA.1.0.sma(128) : fatal error 107too many error messages on one line 
I have defined macro like this
PHP Code:
#define SetBit(%1,%2) (%1 |= (1 << (%2 & 31))) 
Error is thrown only when the code is written like this:
PHP Code:
        g_bLastZombie true
        SetBit
(g_bitIsLastZombieiPlayer
when I change the position of the bit like this:
PHP Code:
        SetBit(g_bitIsLastZombieiPlayer)
        
g_bLastZombie true 
compiler is happy, I can't find a concrete explanation for this.

And btw, when I change the macro like this:
PHP Code:
#define SetBit(%1,%2) %1 |= (1 << (%2 & 31)) 
it's working in both ways.
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]

Last edited by Shadows Adi; 11-07-2020 at 03:36.
Shadows Adi 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 14:09.


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