Help please. -
aCloudy - 08.01.2015
I get these warnings:
C:\Program Files\lvcnrr\gamemodes\LVCNR1.pwn(1950) : warning 217: loose indentation
C:\Program Files\lvcnrr\gamemodes\LVCNR1.pwn(220
![Cool](images/smilies/cool.gif)
: warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Warnings.
Код:
dcmd_setvip(playerid,params[])
{
new ID;
new vip;
new string[128];
if(!IsPlayerName(playerid,"S.rockZ") && !IsPlayerName(playerid, "Mangoes")) return SCM(playerid,COLOR_WHITE,"{FF0000}[ERROR]{FFFFFF}You have submitted an invalid command, Type /commands or /cmds to see the server commands");
if(sscanf(params,"ui",ID,vip))
{
SendClientMessage(playerid,COLOR_WHITE,""COL_USAGE"[SYNTAX] {FFFFFF}/setvip [PLAYER_ID] [VIP_LEVEL]");
return 1;
}
if(!IsPlayerConnected(ID))
{
format(string,sizeof(string),"{AFAFAF}[Error]: {FFFFFF}Invalid player ID.");
SendClientMessage(playerid,COLOR_WHITE,string);
return 1;
}
IsVIP[ID] =vip;
if(IsVIP[ID] == 0)
{ format(s_vip,sizeof(s_vip),"{FFFFFF}N/A"); }
if(IsVIP[ID] == 1)
{ format(s_vip,sizeof(s_vip),"{006600}Regular"); }
if(IsVIP[ID] == 2)
{ format(s_vip,sizeof(s_vip),"{660000}Alpha"); }
if(IsVIP[ID] == 3)
{ format(s_vip,sizeof(s_vip),"{AFAFAF}Royal"); }
if(IsVIP[ID] == 4)
{ format(s_vip,sizeof(s_vip),"{FFFF00}Elite"); }
if(IsVIP[ID] == 5)
{ format(s_vip,sizeof(s_vip),"{6600FF}Delta"); }
format(string,sizeof(string),""COL_ADMIN"[ADMIN] {FFFFFF}%s has set your V.I.P level to {F8E607}%s{FFFFFF}!",PlayerName(playerid),s_vip);
SendClientMessage(ID,COLOR_WHITE,string);
format(string,sizeof(string),""COL_ADMIN"[ADMIN] {FFFFFF}You have set {AFAFAF}%s(%d){FFFFFF}'s V.I.P level to {F8E607}%s{FFFFFF}!",PlayerName(ID),ID,s_vip);
SendClientMessage(playerid,COLOR_WHITE,string);
return 1;
}
Re: Help please. -
Pottus - 08.01.2015
Just make sure your code is aligned correctly and if someone says use #pragma tabsize 0 don't use it.
Re: Help please. -
Glossy42O - 08.01.2015
Ignore it. it won't do nothing.
Re: Help please. -
Pottus - 08.01.2015
Quote:
Originally Posted by Stuun23
Ignore it. it won't do nothing.
|
A warning is an error.
Re: Help please. -
ahmedkoki - 08.01.2015
replace with this
pawn Код:
dcmd_setvip(playerid,params[])
{
new ID;
new vip;
new string[128];
if(!IsPlayerName(playerid,"S.rockZ") && !IsPlayerName(playerid, "Mangoes")) return SCM(playerid,COLOR_WHITE,"{FF0000}[ERROR]{FFFFFF}You have submitted an invalid command, Type /commands or /cmds to see the server commands");
if(sscanf(params,"ui",ID,vip))
{
SendClientMessage(playerid,COLOR_WHITE,""COL_USAGE"[SYNTAX] {FFFFFF}/setvip [PLAYER_ID] [VIP_LEVEL]");
return 1;
}
if(!IsPlayerConnected(ID))
{
format(string,sizeof(string),"{AFAFAF}[Error]: {FFFFFF}Invalid player ID.");
SendClientMessage(playerid,COLOR_WHITE,string);
return 1;
}
IsVIP[ID] =vip;
if(IsVIP[ID] == 0)
{ format(s_vip,sizeof(s_vip),"{FFFFFF}N/A"); }
if(IsVIP[ID] == 1)
{ format(s_vip,sizeof(s_vip),"{006600}Regular"); }
if(IsVIP[ID] == 2)
{ format(s_vip,sizeof(s_vip),"{660000}Alpha"); }
if(IsVIP[ID] == 3)
{ format(s_vip,sizeof(s_vip),"{AFAFAF}Royal"); }
if(IsVIP[ID] == 4)
{ format(s_vip,sizeof(s_vip),"{FFFF00}Elite"); }
if(IsVIP[ID] == 5)
{ format(s_vip,sizeof(s_vip),"{6600FF}Delta"); }
format(string,sizeof(string),""COL_ADMIN"[ADMIN] {FFFFFF}%s has set your V.I.P level to {F8E607}%s{FFFFFF}!",PlayerName(playerid),s_vip);
SendClientMessage(ID,COLOR_WHITE,string);
format(string,sizeof(string),""COL_ADMIN"[ADMIN] {FFFFFF}You have set {AFAFAF}%s(%d){FFFFFF}'s V.I.P level to {F8E607}%s{FFFFFF}!",PlayerName(ID),ID,s_vip);
SendClientMessage(playerid,COLOR_WHITE,string);
return 1;
}
Re: Help please. -
aCloudy - 08.01.2015
Quote:
Originally Posted by ahmedkoki
replace with this
pawn Код:
dcmd_setvip(playerid,params[]) { new ID; new vip; new string[128]; if(!IsPlayerName(playerid,"S.rockZ") && !IsPlayerName(playerid, "Mangoes")) return SCM(playerid,COLOR_WHITE,"{FF0000}[ERROR]{FFFFFF}You have submitted an invalid command, Type /commands or /cmds to see the server commands"); if(sscanf(params,"ui",ID,vip)) { SendClientMessage(playerid,COLOR_WHITE,""COL_USAGE"[SYNTAX] {FFFFFF}/setvip [PLAYER_ID] [VIP_LEVEL]"); return 1; } if(!IsPlayerConnected(ID)) { format(string,sizeof(string),"{AFAFAF}[Error]: {FFFFFF}Invalid player ID."); SendClientMessage(playerid,COLOR_WHITE,string); return 1; } IsVIP[ID] =vip;
if(IsVIP[ID] == 0) { format(s_vip,sizeof(s_vip),"{FFFFFF}N/A"); } if(IsVIP[ID] == 1) { format(s_vip,sizeof(s_vip),"{006600}Regular"); } if(IsVIP[ID] == 2) { format(s_vip,sizeof(s_vip),"{660000}Alpha"); } if(IsVIP[ID] == 3) { format(s_vip,sizeof(s_vip),"{AFAFAF}Royal"); } if(IsVIP[ID] == 4) { format(s_vip,sizeof(s_vip),"{FFFF00}Elite"); } if(IsVIP[ID] == 5) { format(s_vip,sizeof(s_vip),"{6600FF}Delta"); }
format(string,sizeof(string),""COL_ADMIN"[ADMIN] {FFFFFF}%s has set your V.I.P level to {F8E607}%s{FFFFFF}!",PlayerName(playerid),s_vip); SendClientMessage(ID,COLOR_WHITE,string); format(string,sizeof(string),""COL_ADMIN"[ADMIN] {FFFFFF}You have set {AFAFAF}%s(%d){FFFFFF}'s V.I.P level to {F8E607}%s{FFFFFF}!",PlayerName(ID),ID,s_vip); SendClientMessage(playerid,COLOR_WHITE,string); return 1; }
|
C:\Program Files\lvcnrr\gamemodes\LVCNR1.pwn(1949) : warning 217: loose indentation
C:\Program Files\lvcnrr\gamemodes\LVCNR1.pwn(2207) : warning 217: loose indentation
C:\Program Files\lvcnrr\gamemodes\LVCNR1.pwn(18863) : error 017: undefined symbol "s_vip"
C:\Program Files\lvcnrr\gamemodes\LVCNR1.pwn(18863) : error 017: undefined symbol "s_vip"
C:\Program Files\lvcnrr\gamemodes\LVCNR1.pwn(18863) : error 029: invalid expression, assumed zero
C:\Program Files\lvcnrr\gamemodes\LVCNR1.pwn(18863) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re: Help please. -
aCloudy - 08.01.2015
Found the problem and solved.