pawn-lang / YSI-Includes

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

[5.x] y_text warning symbol is never use and Jagged_UnsafeResizeOne need to return #365

Open HansenVN opened 5 years ago

HansenVN commented 5 years ago
stock Jagged_UnsafeResizeOne(array[][], slot, newSize)
{
    // Get a pointer to the next slot.
    #emit LOAD.S.alt array
    #emit LOAD.S.pri slot
    #emit INC.I
    #emit IDXADDR
    #emit PUSH.pri
    // Get the offset to this array's current start point.
    #emit LOAD.S.pri slot
    #emit LIDX
    // Get the offset to the new end.
    #emit LOAD.S.alt newSize
    #emit XCHG
    #emit IDXADDR
    // Subtract 4 to make it the offset for the next slot, save it to the
    // pointer we pushed earlier.
    #emit ADD.C 0xFFFFFFFC
    #emit SREF.S.pri 0xFFFFFFFC
    // End.
    #emit POP.pri
    #emit RETN
    return 0;
}

I got some error, and make it a return. Did I do right?

HansenVN commented 5 years ago

It happens when I'm trying to add y_text.

#include <YSI_Data\y_iterate>
#include <YSI_Data\y_playerarray>
#include <YSI_Coding\y_timers>
#include <YSI_Coding\y_va>
#include <YSI_Coding\y_hooks>
#include <YSI_Server\y_colors>
#include <YSI_Game\y_vehicledata>
#include <YSI_Players\y_languages>
#include <YSI_Players\y_text>```

D:\GAMEGTA FROM ZERO\dependencies\YSI-Includes\YSI_Players\y_text\y_text_impl.inc:570 (warning) symbol is never used: "str" D:\GAMEGTA FROM ZERO\dependencies\YSI-Includes\YSI_Players\y_text\y_text_impl.inc:570 (warning) symbol is never used: "file" D:\GAMEGTA FROM ZERO\dependencies\YSI-Includes\YSI_Players\y_text\y_text_impl.inc:592 (warning) symbol is never used: "name"



I also got these warnings, can you help me hide it?

```stock _Text_CheckOwnership(file[], str[])
{
    // TODO...
//  P:4("_Text_CheckOwnership called: %s, %s", file, str);
//  format(YSI_g_sReturnText, sizeof (YSI_g_sReturnText), "%s:%s", file, str);
    return 1;
}```

```stock _Text_LookupName(name[])
{
    // TODO...
//  P:4("_Text_LookupName called: %s, %s", name, YSI_g_sReturnText);
//  new
//      sh = bernstein(YSI_g_sReturnText);
//  for (new i = 0; i != Y_TEXT_MAX_SETS; ++i)
//  {
//      if (sh == YSI_g_sTextSets[i][E_TEXT_SETS_HASH] && !strcmp(YSI_g_sReturnText, YSI_g_sTextSets[i][E_TEXT_SETS_NAME]))
//      {
//          // Got the start slot.
//          return Text_FindEntry(YSI_g_sTextSets[i][E_TEXT_SETS_HASH], name, bernstein(name));
//      }
//  }
    return -1;
}```