new giveplayerid = ReturnUser(tmp); warning 219: local variable "giveplayerid" shadows a variable at a preceding level
if(strcmp(cmd, "/pme", true) == 0) { if(Loggad[playerid] == 1) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SCM(playerid, COLOR_WHITE, "USAGE: /Pme <Player ID> <Message>"); return 1; } new giveplayerid = ReturnUser(tmp); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SCM(playerid, COLOR_WHITE, "USAGE: /Pme <Player ID> <Message>"); return 1; } if(IsPlayerConnected(giveplayerid)) { new Text2[355]; GetPlayerName(playerid, Spelare, sizeof(Spelare)); GetPlayerName(giveplayerid, Spelare2, sizeof(Spelare2)); format(Text2, sizeof(Text2), "** Private Message From %s: %s **", Spelare, result); SCM(giveplayerid, COLOR_YELLOW, Text2); format(Text2, sizeof(Text2), "** Private Message Sent to %s: %s **", Spelare2, result); SCM(playerid, COLOR_YELLOW, Text2); } else{SCM(playerid, COLOR_RED, "MAIN ERROR(That player isn't online!)");} } return 1; }
#define TEAM_ORANGE_COLOR 0xFF830000 #define TEAM_COR_COLOR 0x39393900
#define COLOR_YELLOW 0xFFFF00AA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_BLUE 0x33CCFFAA #define c_y 0xFFFF00AA #define COLOR_DBLUE 0x2641FEAA #define COLOR_GREY 0xBEBEBEAA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_RED 0xAA3333AA #define SCM SendClientMessage #define GameLanguageText #define GGameTextForAll #define TEAM_CYAN 1 #define TEAM_BLUE 2 #define TEAM_GREEN 3 #define TEAM_ORANGE 4 #define TEAM_COR 5 #define TEAM_BAR 6 #define TEAM_TAT 7 #define TEAM_CUN 8 #define TEAM_STR 9 #define TEAM_HIT 10 #define TEAM_ADMIN 11 #define TEAM_GREEN_COLOR 0xFFFFFFAA #define TEAM_JOB_COLOR 0xFFB6C1AA #define TEAM_HIT_COLOR 0xFFFFFF00 #define TEAM_BLUE_COLOR 0x8D8DFF00 #define TEAM_GROVE_COLOR 0x00D900C8 #define TEAM_VAGOS_COLOR 0xFFC801C8 #define TEAM_BALLAS_COLOR 0xD900D3C8 #define TEAM_AZTECAS_COLOR 0x01FCFFC8 #define TEAM_CYAN_COLOR 0xFF8282AA #define TEAM_ORANGE_COLOR 0xFF830000 #define TEAM_COR_COLOR 0x39393900 #define TEAM_BAR_COLOR 0x00D90000 #define TEAM_TAT_COLOR 0xBDCB9200 #define TEAM_CUN_COLOR 0xD900D300 #define TEAM_STR_COLOR 0x01FCFF00 #define TEAM_ADMIN_COLOR 0x00808000
new giveplayerid = ReturnUser(tmp);
to giveplayerid = ReturnUser(tmp); |
pwn(811) : warning 217: loose indentation
Thanks!
o also forgot to say that the "return" gets the warning Код:
pwn(811) : warning 217: loose indentation |
hmm.. it doesn't matter if i tab it 1 or 5 times. its still the same
|
#pragma tabsize 0
Originally Posted by wiki.sa-mp.com
Indentation means to push text along from the left of the page. This is used in pawn to make code easier to read.
|
Loose indentation means you have missed some spaces or added more spaces. Just use backspace until the compiler compiles it successfully, or use spaces. Also, you don't need to use #pragma tabsize 0
|
thanks!
I tried again and now i fixed it without the #pragma tabsize but the defines are still warned and dont know whats cause the warnings |
#define COLOR_WHITE 0xFFFFFFAA
#define TEAM_GREEN_COLOR 0xFFFFFFAA
0xFFFFFFAA
pawn Код:
pawn Код:
|