SA-MP Forums Archive
Warning on a variable - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Warning on a variable (/showthread.php?tid=271440)



Warning on a variable - GangsTa_ - 24.07.2011

pawn Код:
if(listitem == 0)
        {
            if(PlayerInfo[playerid][pCarLic] == 0)
            {
                if(GetPlayerMoney(playerid) < 4999)
                {
                    SendClientMessage(playerid, COLOR_GREY, "No enough money!");
                    return 1;
                }
                else
                {
                    SendClientMessage(playerid, COLOR_WHITE, "- Instructor: Sit in a car outside to take the driving test.");
                    TakingLesson[playerid] == 1;
                    return 1;
                    /*SendClientMessage(playerid, COLOR_LIGHTBLUE, "You bought a driving license for 5000$.");
                    SafeGivePlayerMoney(playerid, -5000);
                    PlayerInfo[playerid][pCarLic] = 1;
                    OnPlayerUpdate(playerid);*/

                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "You already have a driving license!");
                return 1;
            }
        }
Why do I get a warning on the line 'TakingLesson[playerid] == 1;' saying 'Expression has no effect'?


Re: Warning on a variable - Libra_PL - 24.07.2011

Change

Код:
TakingLesson[playerid] == 1;
to...

Код:
TakingLesson[playerid] = 1;



Re: Warning on a variable - GangsTa_ - 24.07.2011

w00t I didn't pay attention to it, thanks)