2 Annoying warnings on my /me command -
R4mpage - 24.12.2013
Well I have this problem and it quite irritates me
Defines
PHP код:
//-------COLORS-------//
#define COLOR_WHITE 0xFFFFFFAA
#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}"
#define COL_GREEN "{00FF22}"
#define COL_LIGHTBLUE "{00CED1}"
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_PURPLE 0x800080FF
#define COLOR_RED 0xFF0000FF
#define team_SASF 1
#define team_Terrorist 2
#define timer
#define pName PlayerName
#define ProxDetector
new PlayerInfo[MAX_PLAYERS][pInfo];
new gPlayerLogged[MAX_PLAYERS];
new sendername[MAX_PLAYER_NAME];
new idx = 1;
Code:
PHP код:
if(strcmp("/me",cmdtext, true,10) == 0)
{
new MEG[128];
if(IsPlayerConnected(playerid))// LINE 353
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[96];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /me [action]");
return 1;
}
if(PlayerInfo[playerid][pMask] == 1)
{
format(MEG, sizeof(MEG), "* Stranger %s", result);
}
else
{
format(MEG, sizeof(MEG), "* %s %s", sendername, result);
}
ProxDetector(30.0, playerid, MEG, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); //line 387
}
}
return 0;
}
Warnings:
Код:
C:\Users\Eigenaar\Documents\Erdem\2\gamemodes\DayZ.pwn(353) : warning 217: loose indentation
C:\Users\Eigenaar\Documents\Erdem\2\gamemodes\DayZ.pwn(387) : warning 215: expression has no effect
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Warnings.
Re: 2 Annoying warnings on my /me command -
SilentSoul - 24.12.2013
Where are those lines ? 358 an 387 mark them please.
Re: 2 Annoying warnings on my /me command -
Sk1lleD - 24.12.2013
Код:
C:\Users\Eigenaar\Documents\Erdem\2\gamemodes\DayZ.pwn(353) : warning 217: loose indentation
make a TAB at
making it above the 'if'.
Код:
C:\Users\Eigenaar\Documents\Erdem\2\gamemodes\DayZ.pwn(387) : warning 215: expression has no effect
Can you post only that line?
Re: 2 Annoying warnings on my /me command -
R4mpage - 24.12.2013
Done.
Other Warning:
PHP код:
ProxDetector(30.0, playerid, MEG, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
First warning is fixed, but the 387 isnt "above"
Re: 2 Annoying warnings on my /me command -
PrivatioBoni - 24.12.2013
Just to clarify, you
do have the code for the ProxDetector, right?
Re: 2 Annoying warnings on my /me command -
R4mpage - 24.12.2013
What do you mean?
I only have #define ProxDetector
nothing else
Re: 2 Annoying warnings on my /me command -
Konstantinos - 24.12.2013
Quote:
Originally Posted by R4mpage
What do you mean?
I only have #define ProxDetector
nothing else
|
Do not use define to all undefined symbols you get - it's wrong.
******: samp proxdetector and you'll find some results. Edit it to your needs and you're done.
Re: 2 Annoying warnings on my /me command -
R4mpage - 24.12.2013
Konstantinos, Can I have your skype, so when i need help i can just skype you? Since you are one of the best scripters You helped all my problems +REP
Re: 2 Annoying warnings on my /me command -
Sk1lleD - 24.12.2013
This is a code I found in this forum (I'm sorry I could not find the topic)
pawn Код:
stock SendRangedMessage(sourceid, color, message[], Float:range)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(sourceid, x, y, z);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerVirtualWorld(sourceid) == GetPlayerVirtualWorld(i))
{
if(IsPlayerInRangeOfPoint(i, range, x, y, z))
{
SendClientMessage(i, color, message);
}
}
}
}
return 1;
}
It's better than ProxDetector
Re: 2 Annoying warnings on my /me command -
R4mpage - 24.12.2013
How to use it?