ZCMD Help
#9

Quote:
Originally Posted by FuNkYTheGreat
Посмотреть сообщение
Код:
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;
}
In your script somewhere msg variable was already in use and it was a global variable , So it was conflicting with your those msg variable,
I change your msg variable to msg2, Now it'll works fine.
Thanks everyone, but i have more "New MSG" in my gm, and they never conflicted, the problem appears when i add the ZCMD commands, but if i remove it, the problem disappear. I know why the warnings appear, but i don't know why those ones appears when i add the zcmd, look, there isn't the only warning

GM.pwn(3819) : warning 219: local variable "msg" shadows a variable at a preceding level
GM.pwn(3881) : warning 219: local variable "msg" shadows a variable at a preceding level
GM.pwn(391 : warning 219: local variable "msg" shadows a variable at a preceding level
GM.pwn(3955) : warning 219: local variable "msg" shadows a variable at a preceding level

But if i remove the ZCMDS the warnings disappear.
Reply


Messages In This Thread
ZCMD Help - by Miguelch1312 - 26.08.2017, 00:29
Re: ZCMD Help - by HoussemGaming - 26.08.2017, 00:45
Respuesta: Re: ZCMD Help - by Miguelch1312 - 26.08.2017, 00:51
Respuesta: ZCMD Help - by Miguelch1312 - 26.08.2017, 02:03
Re: ZCMD Help - by FuNkYTheGreat - 26.08.2017, 09:07
Re: ZCMD Help - by Dayrion - 26.08.2017, 11:10
Re: ZCMD Help - by Vince - 26.08.2017, 11:24
Re: ZCMD Help - by FuNkYTheGreat - 26.08.2017, 12:26
Respuesta: Re: ZCMD Help - by Miguelch1312 - 26.08.2017, 12:51
Re: ZCMD Help - by Dayrion - 26.08.2017, 13:42

Forum Jump:


Users browsing this thread: 1 Guest(s)