Updating YSI includes issue
#1

Hello, I am trying to update my gamemode to the last YSI includes(from here: https://github.com/pawn-lang/YSI-Includes/releases) but I got alot of errors and wanrnigs like
Warnings:
Код:
pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\..\YSI_Core\..\YSI_Internal\y_funcinc.inc(112) : warning 239: literal array/string passed to a non-const parameter
pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\..\YSI_Storage\..\YSI_Internal\..\amx\asm.inc(257) : warning 214: possibly a "const" array argument was intended: "ctx"
pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\..\YSI_Storage\..\YSI_Internal\..\amx\disasm.inc(139) : warning 214: possibly a "const" array argument was intended: "ctx"
pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\..\YSI_Storage\..\YSI_Internal\..\amx\disasm.inc(143) : warning 214: possibly a "const" array argument was intended: "ctx"
pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\..\YSI_Storage\..\YSI_Internal\..\amx\disasm.inc(147) : warning 214: possibly a "const" array argument was intended: "ctx"
pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\..\YSI_Storage\..\YSI_Internal\..\amx\disasm.inc(151) : warning 214: possibly a "const" array argument was intended: "ctx"
pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\..\YSI_Storage\..\YSI_Internal\..\amx\disasm.inc(159) : warning 214: possibly a "const" array argument was intended: "ctx"
pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\..\YSI_Storage\..\YSI_Internal\..\amx\disasm.inc(163) : warning 214: possibly a "const" array argument was intended: "ctx"
pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\..\YSI_Storage\..\YSI_Internal\..\amx\codescan.inc(211) : warning 219: local variable "sip" shadows a variable at a preceding level
pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\..\YSI_Storage\..\YSI_Internal\..\amx\codescan.inc(265) : warning 219: local variable "sip" shadows a variable at a preceding level
pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\..\YSI_Storage\..\YSI_Internal\..\amx\codescan.inc(743) : warning 214: possibly a "const" array argument was intended: "cs"
pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\..\YSI_Storage\..\YSI_Internal\..\amx\codescan.inc(877) : warning 214: possibly a "const" array argument was intended: "csm"
pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\..\YSI_Storage\..\YSI_Internal\..\amx\codescan.inc(890) : warning 214: possibly a "const" array argument was intended: "csm"
pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\..\YSI_Storage\..\YSI_Internal\..\amx\codescan.inc(901) : warning 214: possibly a "const" array argument was intended: "csm"
pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\..\YSI_Storage\..\YSI_Internal\..\amx\codescan.inc(911) : warning 214: possibly a "const" array argument was intended: "csm"
pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\..\YSI_Storage\..\YSI_Internal\..\amx\codescan.inc(916) : warning 214: possibly a "const" array argument was intended: "csm"
pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\..\YSI_Storage\..\YSI_Internal\..\amx\codescan.inc(952) : warning 214: possibly a "const" array argument was intended: "csm"
pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\..\YSI_Storage\..\YSI_Internal\..\amx\codescan.inc(956) : warning 214: possibly a "const" array argument was intended: "csm"
pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\y_utils.inc(656) : warning 214: possibly a "const" array argument was intended: "ip"
pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\y_utils.inc(1469) : warning 219: local variable "min" shadows a variable at a preceding level
pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\y_utils.inc(1470) : warning 219: local variable "max" shadows a variable at a preceding level
pawno\include\YSI\..\YSI_Data\..\YSI_Internal\..\YSI_Core\y_utils.inc(1466) : warning 214: possibly a "const" array argument was intended: "arr"
pawno\include\YSI\..\YSI_Data\y_foreach/impl.inc(95) : warning 214: possibly a "const" array argument was intended: "array"
pawno\include\YSI\..\YSI_Data\y_foreach/impl.inc(164) : warning 214: possibly a "const" array argument was intended: "array"
pawno\include\YSI\..\YSI_Data\y_foreach/impl.inc(181) : warning 214: possibly a "const" array argument was intended: "counts"
pawno\include\YSI\..\YSI_Data\..\YSI_Coding\y_hooks/impl.inc(347) : warning 214: possibly a "const" array argument was intended: "name"
pawno\include\YSI\..\YSI_Data\..\YSI_Coding\y_hooks/impl.inc(347) : warning 214: possibly a "const" array argument was intended: "preloads"
pawno\include\YSI\..\YSI_Data\..\YSI_Coding\y_hooks/impl.inc(374) : warning 214: possibly a "const" array argument was intended: "name"
pawno\include\YSI\..\YSI_Data\..\YSI_Coding\y_hooks/impl.inc(374) : warning 214: possibly a "const" array argument was intended: "hooks"
pawno\include\YSI\..\YSI_Data\..\YSI_Coding\y_hooks/impl.inc(599) : warning 214: possibly a "const" array argument was intended: "name"
pawno\include\YSI\..\YSI_Data\..\YSI_Coding\y_hooks/impl.inc(663) : warning 214: possibly a "const" array argument was intended: "hooks"
Errors(there are alot but I give some of them)
Код HTML:
syntax error in the expression, or invalid function call
on codes like:
if(Lmaximumy<maximumy+(Range/2)) 	Lmaximumy= maximumy+(Range/2);

minimumx = GasX - (Range/2);	maximumx = GasX + (Range/2);

SafeZone= GangZoneCreate(minimumx-(Range/2),minimumy-(Range/2),maximumx+(Range/2),maximumy+(Range/2));
and so on.....
What can I do to resolve these problems? Thanks.
Note: My server actually have a very older YSI includes version.
Reply
#2

bumb
Reply
#3

Use 3.10.8 of the community compiler instead of the 3.10.9

https://github.com/pawn-lang/compile...es/tag/v3.10.8
Reply
#4

Quote:
Originally Posted by ******
Посмотреть сообщение
Or use the 5.x branch. 4.x is still somewhat supported, but most of my effort is now on 5.x - I was specifically asked not to fix these warnings on the 4.x branch.
Nope, still the same errors. I tried with 5.x branch..
Any cure for this errors while updating with the new includes?
And yes, I am using the latest compiler(3.10.9)
Reply
#5

Other warnings/errors:
Код HTML:
warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level
at codes like:
stock PlayAudioStreamForPlayersInCar(vehicleid,url[])
{
    foreach(Player,i)
    {
        if(IsPlayerInAnyVehicle(i))
        {
            if(GetPlayerVehicleID(i) == vehicleid)
            {
                PlayAudioStreamForPlayer(i,url);
            }
        }
    }
    return 1;
}
or
pawno\include\YSI_Data\y_foreach\..\..\YSI_Coding\y_hooks\..\y_cgen\..\..\YSI_Core\y_core\..\..\amx\codescan.inc(212) : warning 219: local variable "sip" shadows a variable at a preceding level

pawno\include\YSI_Data\y_foreach\..\..\YSI_Coding\y_hooks\..\y_cgen\..\..\YSI_Core\y_core\..\..\amx\codescan.inc(266) : warning 219: local variable "sip" shadows a variable at a preceding level
Oh yeah, it seems that 5.x gave less warnings then the default one, but the errors still the sames...
Reply
#6

Quote:
Originally Posted by ******
Посмотреть сообщение
Well the first warning is because you are doing `foreach (Player, i)` instead of `foreach (new i : Player)`.

The rest are probably because you have a global variable called `sip` somewhere.
You're right, but how remains with these errors like
Код HTML:
if(Lminimumx != minimumx-(Range/2)) //error 076: syntax error in the expression, or invalid function call
or
if(Lminimumx>minimumx-(Range/2))	Lminimumx= minimumx-(Range/2);//error 076: syntax error in the expression, or invalid function call
Reply
#7

Nevermind me, I changed Range variable to another name and the errors dissapeard.
Reply
#8

Just one more error, I know it sounds weird but I got errors on this line:
new final = checks+finalinterest-TaxValue;
Код HTML:
error 020: invalid symbol name ""
error 001: expected token: "=", but found "const"
error 008: must be a constant expression; assumed zero
fatal error 107: too many error messages on one line
Variables are defined as below:
new checks;
new finalinterest;
new TaxValue;
Reply
#9

Quote:
Originally Posted by ******
Посмотреть сообщение
Ahh, final is a keyword in YSI. However, you can disable it with:

Код:
#define YSI_NO_KEYWORD_final
At the top of your mode.
Oh, thank you, now it's working
+rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)