[Include] YSI 4
#1

Important update

You no longer need to use git to get your YSI! Just download latest 'YSI.zip' from this page - https://github.com/pawn-lang/YSI-Includes/releases

Disclaimer: Whole YSI project was published under MPL 1.1 license

There wasn't an official thread as it resided in discussion section, but for sake of easy searching:

https://github.com/pawn-lang/YSI-Includes

ysi.tl is default branch.

I'd be really happy if someone such as Slice, Zeex or Southclaw could accept coownership of the repo.

Additionally if you are not using y_text, you can completely remove scriptfiles.
Reply
#2

Thanks for re-posting. I've always wanted to contribute to YSI, and now it's possible again since the repository is back up. I should make a pull request soon.
Reply
#3

Quote:
Originally Posted by Emmet_
View Post
Thanks for re-posting. I've always wanted to contribute to YSI, and now it's possible again since the repository is back up. I should make a pull request soon.
Look's like Emmet_ could also be up for co-ownership. This is going great!
Reply
#4

Thanks for the download!
Reply
#5

I will follow the repository and maybe should make pull request.

Thanks for the post.
Reply
#6

Ok, we have the latest ****** version. I've added patch for AUTO_INCLUDE_GUARD in Zeex's compiler, and added new constant NESTED_ELLIPSIS (2d array ellipsis init is now available). Upcoming: No more Iter_Init for 2d iterators.
Reply
#7

Getting this error with those new includes: I used 4.0 as well before but this seems to have a problem.
Code:
Did you do <YSI/y_hooks> instead of the required <YSI\y_hooks>?
Tried both slashes, nothing worked.
Reply
#8

Using standard compiler, Zeex's compiler, or Zeex's compiler in compatibility mode?
Reply
#9

Just Zeex's compiler.
Reply
#10

There was a bug with AUTO_INCLUDE_GUARD constant just before ****** left, I commited a fix later. If you're using latest YSI-Includes version with my patch, it shouldn't raise this error at all (except in compat mode, so with #pragma compat 1, or -Z+ flag passed to the compiler). If it does, please paste somewhere contents of your YSI_Internal\y_compilerpass.inc
Reply
#11

Thanks for the upload, I appreciate!
Reply
#12

For now I only have idea to remove neccessity for Iter_Init for Zeex compiler, other than that not much. If you have any issues, add them on github so I get mail notification and some tracking of what has to be done. But to be honest @emit runtime modifications are still kinda black magic for me, I have no idea how to even debug them (if someone could write something like gdb/ollydbg for P-code it would be awewsome). There was a bug with some combination of -O2 and -D1 flags and polymorphic code, I don't know if he fixed them though
Reply
#13

y_ini is bugged, Whenever you save an empty item, It keeps making a new line in the INI file.

So if you did:
pawn Код:
public OnGameModeInit()
{
    for(new i; i <= 50; i++)
    {
        new INI:iniFile = INI_Open("testFile.ini");
        INI_SetTag(iniFile, "examples");
        INI_WriteString(iniFile, "Test", "");
        INI_WriteString(iniFile, "Test2", "");
        INI_Close(iniFile);
    }
    return 1;
}
It'd be:
Код:
[examples]
Test2 = 


















































Test =
And actually I fixed it.
You have to open the file YSI_Storage/y_ini/writing.inc and edit the line 883 which should crosspond to:
if (!deleted) fwrite(buffer, sLine);
And change it to:
if (!deleted) fwrite(buffer, "");

This will create a new line in the file but atleast the newline wont repeat...
So running the same code above will output:
Код:
[examples]
Test2 = 

Test =
I am not free at the moment to create a pull request but if someone else can do it... No problem.
E: Okay.. I will create one now.
Reply
#14

What different of y_foreach y_iterate and y_iterate3b at YSI_Data
and Y_Visual\y_commands\card.h <- what the heck it is haha
Reply
#15

y_iterate3b is not used anywhere as it seems, it might be older or newer version in development. About card.h: Yeah, wtf
Reply
#16

Today I received a big update to y_iterate: https://github.com/Misiur/YSI-Includ...3e80f368746905

Quote:

New iterators:

"Vehicle" - Any vehicle created on the server.
"LocalVehicle" - Any vehicle created in the current script.
"Actor" - Any actor created on the server (0.3.7+).
"LocalActor" - Any actor created in the current script.
"Powers(base)" - Loop through a power series:

foreach (new i : Powers(2))
{
// 1, 2, 4, 8, 16, ...
}

"Fib()" - Fibonacci sequence. Can't be nested.
"Random(count, min = 0, max = cellmax)" - "Count" random numbers between
"min" and "max". If only one range parameter is given, it is the max,
if two are given, they are "min, max". Can't be nested.
"Null(arr[])" - Every index in to the given array where the slot is
zero.
"NonNull(arr[])" - Every index in to the given array where the slot is
not zero.
"Until(value, arr[])" - Loop through the array until the given value is
hit.
"Filter(value, arr[])" - Every index in to the given array where the
slot equals "value".

New (or improved) compile-time options:

"FOREACH_NO_PLAYERS" - Disable "Player".
"FOREACH_NO_BOTS" - Disable "NPC", "Bot", and "Charater".
"FOREACH_NO_VEHICLES" - Disable "Vehicle", and "LocalVehicle".
"FOREACH_NO_ACTORS" - Disable "Actor", and "LocalActor".
"FOREACH_NO_LOCALS" - Disable "LocalVehicle" and "LocalActor".

"YSI_NO_MASTER" - "Actor" and "LocalActor" are identical, as are
"Vehicle" and "LocalVehicle" (no multi-script support, similar to
"FIXES_IsSingle").

Other features:

"NESTED_ELLIPSIS" supported instead of "Iter_Init" (unless you have 3+
dimensions in the array).
Version bump to 41.
Simplified script init code vastly.

Reply
#17

That update was ****** who did?
Reply
#18

- nvm delete please
Reply
#19

Код:
Modular Gamemode\pawno\include\YSI\..\YSI_Visual\..\YSI_Core\..\YSI_Coding\..\YSI_Core\..\YSI_Storage\y_amx.inc(77) : fatal error 100: cannot read from file: "..\amx\asm"
wtf
Reply
#20

Quote:
Originally Posted by sammp
Посмотреть сообщение
Код:
Modular Gamemode\pawno\include\YSI\..\YSI_Visual\..\YSI_Core\..\YSI_Coding\..\YSI_Core\..\YSI_Storage\y_amx.inc(77) : fatal error 100: cannot read from file: "..\amx\asm"
wtf
You need amx by Zeex

https://github.com/Zeex/amx_assembly
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)