CMD:claimcoupon(playerid, params[])
{
new title[64], msg[126];//Line 4684
format(title,sizeof(title),"{1B8AE4}Claim Coupon");
format(msg,sizeof(msg),"Type the coupon code below to\nclaim your reward:");
ShowPlayerDialog(playerid, coupon1, DIALOG_STYLE_INPUT, title, msg, "Claim", "Cancel");
return 1;
}
public HouseEnter(playerid, houseid)
{
if(PInfo[playerid][House1] == HInfo[houseid][hHouseID]) { new msg[64]; format(msg,sizeof(msg),"Welcome %s.", PlayerName(playerid)); SendClientMessage(playerid, COLOR_WHITE, msg); }//Line 3080
if(PInfo[playerid][House2] == HInfo[houseid][hHouseID]) { new msg[64]; format(msg,sizeof(msg),"Welcome home, %s.", PlayerName(playerid)); SendClientMessage(playerid, COLOR_WHITE, msg); }
InHouse[playerid] = houseid;
SetPlayerInterior(playerid, HInfo[houseid][hInterior]);
SetPlayerPos(playerid, HInfo[houseid][hiX],HInfo[houseid][hiY],HInfo[houseid][hiZ]);
SetPlayerVirtualWorld(playerid, houseid);
return 1;
}
CMD:claimcoupon(playerid, params[])
{
new title[64], msg2[126];//Line 4684
format(title,sizeof(title),"{1B8AE4}Claim Coupon");
format(msg2,sizeof(msg2),"Type the coupon code below to\nclaim your reward:");
ShowPlayerDialog(playerid, coupon1, DIALOG_STYLE_INPUT, title, msg2, "Claim", "Cancel");
return 1;
}
public HouseEnter(playerid, houseid)
{
if(PInfo[playerid][House1] == HInfo[houseid][hHouseID]) { new msg2[64]; format(msg2,sizeof(msg2),"Welcome %s.", PlayerName(playerid)); SendClientMessage(playerid, COLOR_WHITE, msg2); }//Line 3080
if(PInfo[playerid][House2] == HInfo[houseid][hHouseID]) { new msg2[64]; format(msg2,sizeof(msg2),"Welcome home, %s.", PlayerName(playerid)); SendClientMessage(playerid, COLOR_WHITE, msg2); }
InHouse[playerid] = houseid;
SetPlayerInterior(playerid, HInfo[houseid][hInterior]);
SetPlayerPos(playerid, HInfo[houseid][hiX],HInfo[houseid][hiY],HInfo[houseid][hiZ]);
SetPlayerVirtualWorld(playerid, houseid);
return 1;
}
|
Код:
CMD:claimcoupon(playerid, params[])
{
new title[64], msg2[126];//Line 4684
format(title,sizeof(title),"{1B8AE4}Claim Coupon");
format(msg2,sizeof(msg2),"Type the coupon code below to\nclaim your reward:");
ShowPlayerDialog(playerid, coupon1, DIALOG_STYLE_INPUT, title, msg2, "Claim", "Cancel");
return 1;
}
public HouseEnter(playerid, houseid)
{
if(PInfo[playerid][House1] == HInfo[houseid][hHouseID]) { new msg2[64]; format(msg2,sizeof(msg2),"Welcome %s.", PlayerName(playerid)); SendClientMessage(playerid, COLOR_WHITE, msg2); }//Line 3080
if(PInfo[playerid][House2] == HInfo[houseid][hHouseID]) { new msg2[64]; format(msg2,sizeof(msg2),"Welcome home, %s.", PlayerName(playerid)); SendClientMessage(playerid, COLOR_WHITE, msg2); }
InHouse[playerid] = houseid;
SetPlayerInterior(playerid, HInfo[houseid][hInterior]);
SetPlayerPos(playerid, HInfo[houseid][hiX],HInfo[houseid][hiY],HInfo[houseid][hiZ]);
SetPlayerVirtualWorld(playerid, houseid);
return 1;
}
I change your msg variable to msg2, Now it'll works fine. |
|
Код:
CMD:claimcoupon(playerid, params[])
{
new title[64], msg2[126];//Line 4684
format(title,sizeof(title),"{1B8AE4}Claim Coupon");
format(msg2,sizeof(msg2),"Type the coupon code below to\nclaim your reward:");
ShowPlayerDialog(playerid, coupon1, DIALOG_STYLE_INPUT, title, msg2, "Claim", "Cancel");
return 1;
}
public HouseEnter(playerid, houseid)
{
if(PInfo[playerid][House1] == HInfo[houseid][hHouseID]) { new msg2[64]; format(msg2,sizeof(msg2),"Welcome %s.", PlayerName(playerid)); SendClientMessage(playerid, COLOR_WHITE, msg2); }//Line 3080
if(PInfo[playerid][House2] == HInfo[houseid][hHouseID]) { new msg2[64]; format(msg2,sizeof(msg2),"Welcome home, %s.", PlayerName(playerid)); SendClientMessage(playerid, COLOR_WHITE, msg2); }
InHouse[playerid] = houseid;
SetPlayerInterior(playerid, HInfo[houseid][hInterior]);
SetPlayerPos(playerid, HInfo[houseid][hiX],HInfo[houseid][hiY],HInfo[houseid][hiZ]);
SetPlayerVirtualWorld(playerid, houseid);
return 1;
}
I change your msg variable to msg2, Now it'll works fine. |
: warning 219: local variable "msg" shadows a variable at a preceding level|
There is a global value or a public variable which is already called msg
Maybe the msg variable that's giving a warning will be in use? Don't you think that, And i already said the reason, Don't try to act over smart dude ! |