What's wrong again?
#1

pawn Код:
CMD:partyhouse(playerid,params[])
{
    if(g_antifall[playerid] = 0)
        {
        SetPlayerPos(playerid,-827.6990,-1901.7521,11.8223);
        SendClientMessage(playerid, 0x00FF00, "Welcome to Party House.");
        new name[MAX_PLAYER_NAME+1], string[128];
        GetPlayerName(playerid, name, sizeof(name));
        format (string, sizeof(string), "[TP]: %s has teleported to /partyhouse.", name);
        SendClientMessageToAll(green, string);
        return 1;
        }
    else return SendClientMessage(playerid, red, "You must exit your vehicle to teleport!");
}
Errors: (there's more, just taking an example)
Код:
C:\Users\Kelvin\Desktop\Scripting\gamemodes\racerevolution.pwn(5229) : warning 211: possibly unintended assignment
Reply
#2

Use == in your if-statement instead of=
Reply
#3

if(g_antifall[playerid] = 0) it should be if(g_antifall[playerid] == 0)
Reply
#4

Quote:
Originally Posted by LeeXian99
Посмотреть сообщение
pawn Код:
CMD:partyhouse(playerid,params[])
{
    if(g_antifall[playerid] = 0)
        {
        SetPlayerPos(playerid,-827.6990,-1901.7521,11.8223);
        SendClientMessage(playerid, 0x00FF00, "Welcome to Party House.");
        new name[MAX_PLAYER_NAME+1], string[128];
        GetPlayerName(playerid, name, sizeof(name));
        format (string, sizeof(string), "[TP]: %s has teleported to /partyhouse.", name);
        SendClientMessageToAll(green, string);
        return 1;
        }
    else return SendClientMessage(playerid, red, "You must exit your vehicle to teleport!");
}
Errors: (there's more, just taking an example)
Код:
C:\Users\Kelvin\Desktop\Scripting\gamemodes\racerevolution.pwn(5229) : warning 211: possibly unintended assignment
'=' is used for assigning the values and '==' is used for checking conditions.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)