1 Error Only ! [REP +]
#1

Getting this error :
Код:
E:\Server\filterscripts\work.pwn(34) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Script :
Код:
//top of script
#include <a_samp>

new LoadCount[MAX_PLAYERS] = 0;

//commands
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
    if( strcmp( cmdtext, "/work", true ) == 0 )
    {
        if( GetVehicleModel( GetPlayerVehicleID( playerid ) ) != 519 &&
            GetVehicleModel( GetPlayerVehicleID( playerid ) ) != 592 &&
            GetVehicleModel( GetPlayerVehicleID( playerid ) ) != 577 )
                return SendClientMessage( playerid, 0xFFFFFFFF, "Yor Need to be In A Vehicle to Do work!" );

        SetPlayerCheckpoint( playerid, 1644.4673, -2416.9844, 13.5547, 15.0 );
        LoadCount[playerid] = 0; // we restart variable
        return 1;
    }

    if( strcmp( cmdtext, "/stopwork", true ) == 0 )
    {
        if(GetPlayerMoney(playerid) >= 1000)
        {
            DisablePlayerCheckpoint( playerid );
            SendClientMessage(playerid,0xFFFFFFFFF,"You Have Canceled the Work!");
            GivePlayerMoney(playerid,-1000); //take $1'000 from him
            LoadCount[playerid] = 0; //we restart variable
        }
        else
        {
            SendClientMessage(playerid,0xFFFFFFFFF,"You Need $1000 to Cancel the Work!");
        }
        else
        {
            SendClientMessage(playerid,0xFFFFFFFFF,"You are Not on A Mission!");
        }
        return 1;
    }
    return 0;
}

public OnPlayerEnterCheckpoint(playerid)
{
    LoadCount[playerid]++; //we add one count to his done works
    switch(LoadCount[playerid])
    {
        case 1: //if he did one load
        {
            SetPlayerCheckpoint(playerid, 1577.2006,1504.4862,10.8342,328.6342); //this is second CP
        }
        case 2: // if he did 2 loads
        {
            LoadCount[playerid] = 0; //we return count to 0
            GivePlayerMoney(playerid, 100000);
            DisablePlayerCheckpoint( playerid );
        }
    }
    return 1;
}
Line : 34
Код:
else
Help !
Reply


Messages In This Thread
1 Error Only ! [REP +] - by Avi57 - 02.08.2012, 13:15
Re: 1 Error Only ! [REP +] - by Roko_foko - 02.08.2012, 13:18
Re: 1 Error Only ! [REP +] - by [MM]RoXoR[FS] - 02.08.2012, 13:27
Re: 1 Error Only ! [REP +] - by XStormiest - 02.08.2012, 13:50
Re: 1 Error Only ! [REP +] - by Avi57 - 03.08.2012, 12:30

Forum Jump:


Users browsing this thread: 1 Guest(s)