pawn-lang / YSI-Includes

Just the YSI include files, none of the extra stuff.
211 stars 106 forks source link

y_va_impl error #627

Closed denisbranisteanu closed 7 months ago

denisbranisteanu commented 2 years ago

Hello, I think this is an issued related to the latest version. I tried to create a gamemode and i've only included the YSI packages.

main file:

#include "constants"

#include "crashdetect"
#include "a_mysql"

#include "YSI_Coding\y_stringhash"
#include "YSI_Coding\y_timers"
#include "YSI_Coding\y_inline"
#include "YSI_Coding\y_hooks"
#include "YSI_Coding\y_va"

// #include "YSI_Extra\y_inline_bcrypt"
#include "YSI_Extra\y_inline_mysql"

#include "YSI_Data\y_sparsearray"
#include "YSI_Data\y_iterate"
#include "YSI_Data\y_bit"

#include "YSI_Visual\y_commands"
#include "YSI_Core\y_utils"

main() 
{

}

constants file:

#define CGEN_MEMORY (90000)
#define MAX_PLAYERS (50)

#define YSI_NO_HEAP_MALLOC
#define YSI_NO_MODE_CACHE
#define YSI_NO_CACHE_MESSAGE

#define FOREACH_NO_LOCALS
#define FOREACH_NO_BOTS

#include "a_samp"

And this is what I get when I try to build the gamemode:

PS C:\Users\Denis\Desktop\Hey> sampctl p build
C:\Users\Denis\Desktop\Hey\dependencies\YSI-Includes\YSI_Coding\y_va\y_va_impl.inc:272 (error) expected token: ")", but found "("
C:\Users\Denis\Desktop\Hey\dependencies\YSI-Includes\YSI_Coding\y_va\y_va_impl.inc:272 (error) invalid expression, assumed zero
C:\Users\Denis\Desktop\Hey\dependencies\YSI-Includes\YSI_Coding\y_va\y_va_impl.inc:272 (error) expression has no effect
C:\Users\Denis\Desktop\Hey\dependencies\YSI-Includes\YSI_Coding\y_va\y_va_impl.inc:272 (fatal) too many error messages on one line
Build encountered fatal error
ADRFranklin commented 2 years ago

@GroWyAdv In future when making an issue, please provide which version of YSI you are on.

If you are on version 4, then you want to replace the version tag in your pawn.json with @4.x to target the latest commits to the v4 branch where there is a fix for this issue.

If you are however not on version 4, then we might need more information from you or at the least a minimal reproduction of the code required that causes the issue.

Arose-Niazi commented 2 years ago

Just including it is enough. In the latest v5.06.1932

#include <a_samp>
#include <YSI_Data/y_iterate>
Arose-Niazi commented 2 years ago

This issue is fixed in the nightly releases so I guess next release should settle this.

Misiur commented 1 year ago

Do not use #include <YSI_Data/y_iterate> use #include <YSI_Data\y_iterate>

Arose-Niazi commented 1 year ago

Okay this is really interesting, would be cool if you could tell why this happened?