28.12.2017, 11:36
Quote:
|
That has happened to me once, It was because I missed any bracket or something like:
Код:
public OnPlayerUpdate(playerid)
{
switch
Player[playerid] = GetTickCount();
return 1;
}
|
Quote:
|
Try some tool like this: https://sampforum.blast.hk/showthread.php?tid=171429
|
Quote:
|
Other case:
Код:
public OnPlayerUpdate(playerid)
{
last = GetTickCount();
return 1;
}
Код:
C:\Users\pc\Documents\SA-MP\pawn\include\amx_assembly\amx_header.inc(311) : warning 219: local variable "last" shadows a variable at a preceding level C:\Users\pc\Documents\SA-MP\pawn\include\YSI-Includes\YSI\..\YSI_Coding\..\YSI_Internal\y_version.inc(299) : warning 219: local variable "last" shadows a variable at a preceding level C:\Users\pc\Documents\SA-MP\pawn\include\YSI-Includes\YSI\..\YSI_Visual\..\YSI_Data\y_foreach/impl.inc(208) : warning 219: local variable "last" shadows a variable at a preceding level C:\Users\pc\Documents\SA-MP\pawn\include\YSI-Includes\YSI\..\YSI_Visual\..\YSI_Data\y_foreach/impl.inc(322) : warning 219: local variable "last" shadows a variable at a preceding level C:\Users\pc\Documents\SA-MP\pawn\include\YSI-Includes\YSI\..\YSI_Visual\..\YSI_Data\y_foreach/impl.inc(344) : warning 219: local variable "last" shadows a variable at a preceding level C:\Users\pc\Documents\SA-MP\pawn\include\YSI-Includes\YSI\..\YSI_Visual\..\YSI_Data\y_foreach/impl.inc(404) : warning 219: local variable "last" shadows a variable at a preceding level Find for 'spec' variables in your scripts You should make a full revision of your script :/ thats annoying |
Код:
stock GetPublicIndexFromName(const name[]) {
InitStaticAmxHeader();
new num_publics = GetNumPublics(gHdr);
//Binary search
new first = 0;
new last = num_publics - 1;
new mid;
while (first <= last) {
mid = (first + last) / 2;
new off = gHdr[AMX_HDR_PUBLICS] - gHdr[AMX_HDR_DAT] + mid * gHdr[AMX_HDR_DEFSIZE];
new nameofs = ReadAmxMemory(off + 4) - gHdr[AMX_HDR_DAT];
new diff = NtCompare(nameofs, name);
if (diff < 0) {
first = mid + 1;
} else if (diff > 0) {
last = mid - 1;
} else {
return mid;
}


