Got errors! I really need help!
#1

Basically I keep getting errors, I have looked all over sa-mp wiki and forums and I cant come up with a solution. If anyone could fix this script I will be really happy and I will put you in the credits on the release anyways here is the errors/warnings and link to script:
link to script(pastebin)
Код:
C:\Users\Jack\Desktop\samp\filterscripts\lspdlift1.pwn(62) : error 029: invalid expression, assumed zero
C:\Users\Jack\Desktop\samp\filterscripts\lspdlift1.pwn(62) : error 004: function "OnPlayerCommandText" is not implemented
C:\Users\Jack\Desktop\samp\filterscripts\lspdlift1.pwn(64) : error 017: undefined symbol "cmdtext"
C:\Users\Jack\Desktop\samp\filterscripts\lspdlift1.pwn(66) : error 017: undefined symbol "playerid"
C:\Users\Jack\Desktop\samp\filterscripts\lspdlift1.pwn(70) : error 017: undefined symbol "playerid"
C:\Users\Jack\Desktop\samp\filterscripts\lspdlift1.pwn(78) : error 017: undefined symbol "playerid"
C:\Users\Jack\Desktop\samp\filterscripts\lspdlift1.pwn(90) : warning 225: unreachable code
C:\Users\Jack\Desktop\samp\filterscripts\lspdlift1.pwn(90) : error 029: invalid expression, assumed zero
C:\Users\Jack\Desktop\samp\filterscripts\lspdlift1.pwn(90) : error 004: function "opentopdoors" is not implemented
C:\Users\Jack\Desktop\samp\filterscripts\lspdlift1.pwn(98) : error 029: invalid expression, assumed zero
C:\Users\Jack\Desktop\samp\filterscripts\lspdlift1.pwn(98) : error 004: function "openbottomdoors" is not implemented
C:\Users\Jack\Desktop\samp\filterscripts\lspdlift1.pwn(104) : error 030: compound statement not closed at the end of file (started at line 21)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


11 Errors.
thanks in advance
Reply
#2

You didn't close your OnFilterScriptInit() callback.
This should work I don't get any errors.
Script:
pawn Код:
#define FILTERSCRIPT

#include <a_samp>
new opentopdoors1;
new openbottomdoors1;

forward opentopdoors();
forward openbottomdoors();

#if defined FILTERSCRIPT
new elevator;
new door1;
new door2;
new door6;
new door7;
new door8;

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" LSPD Lift v0.2 Complete");
    print("--------------------------------------\n");
    AddStaticVehicleEx(497,1574.51354980,-1656.38269043,28.66060638,0.00000000,-1,-1,15); //Police Maverick
    AddStaticVehicleEx(469,1557.99816895,-1642.00146484,28.50211525,0.00000000,-1,-1,15); //Sparrow
    AddStaticVehicleEx(469,1571.92041016,-1642.68835449,28.50211525,0.00000000,-1,-1,15); //Sparrow
    elevator = CreateObject(2898,1552.10888672,-1652.88354492,12.58063602,0.00000000,0.00000000,0.00000000); //object(funturf_law) (1)
    CreateObject(974,1553.41918945,-1655.62573242,15.33435249,0.00000000,0.00000000,0.00000000); //object(tall_fence) (1)
    CreateObject(974,1550.06372070,-1650.12475586,14.77774048,0.00000000,0.00000000,90.00000000); //object(tall_fence) (2)
    CreateObject(974,1553.41894531,-1655.62500000,20.83435249,0.00000000,0.00000000,0.00000000); //object(tall_fence) (3)
    CreateObject(974,1553.41894531,-1655.62500000,24.58435249,0.00000000,0.00000000,0.00000000); //object(tall_fence) (4)
    door1 = CreateObject(3051,1550.04675293,-1653.87036133,13.92138004,0.00000000,0.00000000,46.00000000); //object(lift_dr) (1)
    door2 = CreateObject(3051,1550.03955078,-1655.05151367,13.92195702,0.00000000,0.00000000,46.00000000); //object(lift_dr) (2)
    CreateObject(974,1550.05029297,-1652.37402344,18.02774048,0.00000000,0.00000000,90.00000000); //object(tall_fence) (6)
    CreateObject(974,1550.04980469,-1652.37402344,21.27774048,0.00000000,0.00000000,90.00000000); //object(tall_fence) (7)
    CreateObject(974,1550.04980469,-1652.37402344,24.52774048,0.00000000,0.00000000,90.00000000); //object(tall_fence) (8)
    CreateObject(2930,1550.11853027,-1655.61718750,28.90720367,90.00000000,0.00000000,0.00000000); //object(chinatgate) (1)
    CreateObject(2930,1550.08398438,-1653.36718750,30.65720367,90.00000000,0.00000000,0.00000000); //object(chinatgate) (3)
    CreateObject(2930,1550.11816406,-1655.61718750,30.65720367,90.00000000,0.00000000,0.00000000); //object(chinatgate) (4)
    CreateObject(2930,1550.08398438,-1653.36718750,28.90720367,90.00000000,0.00000000,0.00000000); //object(chinatgate) (5)
    CreateObject(2930,1552.66149902,-1655.63513184,29.01395035,90.00000000,0.00000000,90.00000000); //object(chinatgate) (6)
    CreateObject(2930,1552.66113281,-1655.63476562,30.76395035,90.00000000,0.00000000,90.00000000); //object(chinatgate) (7)
    CreateObject(2930,1552.75744629,-1650.64465332,29.03897095,90.00000000,0.00000000,90.00000000); //object(chinatgate) (9)
    CreateObject(2930,1552.75683594,-1650.64453125,30.78897095,90.00000000,0.00000000,90.00000000); //object(chinatgate) (10)
    CreateObject(2930,1554.74182129,-1650.69531250,29.03897095,90.00000000,0.00000000,90.00000000); //object(chinatgate) (11)
    CreateObject(2930,1554.72106934,-1650.67907715,30.78897095,90.00000000,0.00000000,90.00000000); //object(chinatgate) (12)
    CreateObject(3051,1554.75109863,-1651.38012695,28.75781059,0.00000000,0.00000000,226.00000000); //object(lift_dr) (5)
    door6 = CreateObject(3051,1554.73388672,-1654.96118164,28.75781059,0.00000000,0.00000000,225.99975586); //object(lift_dr) (6)
    door7 = CreateObject(3051,1554.74902344,-1652.59082031,28.75781059,0.00000000,0.00000000,225.99975586); //object(lift_dr) (7)
    door8 = CreateObject(3051,1554.73632812,-1653.79687500,28.75781059,0.00000000,0.00000000,225.99975586); //object(lift_dr) (8)
    CreateObject(2930,1554.68176270,-1655.57006836,29.03246307,90.00000000,0.00000000,90.00000000); //object(chinatgate) (13)
    CreateObject(2930,1554.68164062,-1655.56933594,30.78246307,90.00000000,0.00000000,90.00000000); //object(chinatgate) (14)
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        SetPVarInt(i, "atthetop", 0);
        return 1;
    }
    return 1;
}

#else

#endif

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/call", cmdtext, true, 10) == 0)
    {
        if(GetPVarInt(playerid, "atthetop") == 0)
        {
            //command to go up
            MoveObject(elevator,1552.10839844,-1652.88281250,27.33063507,5);
            SetPVarInt(playerid, "atthetop", 1);
            MoveObject(door1,1550.04675293,-1653.87036133,13.92138004,2);
            MoveObject(door2,1550.03955078,-1655.05151367,13.92195702,2);
            opentopdoors1 = SetTimer("opentopdoors",3000,false);
        }
        else
        {
            //command to go down
            SetPVarInt(playerid, "atthetop", 0);
            MoveObject(elevator,1552.10888672,-1652.88354492,12.58063602,5);
            MoveObject(door6,1554.73388672,-1654.96118164,28.75781059,2);
            MoveObject(door7,1554.74902344,-1652.59082031,28.75781059,2);
            MoveObject(door8,1554.73632812,-1653.79687500,28.75781059,2);
            openbottomdoors1 = SetTimer("openbottomdoors",3000,false);
        }
        return 1;
    }
    return 0;
}

public opentopdoors()
{
    KillTimer(opentopdoors1);
    MoveObject(door6,1554.75109863,-1651.38012695,28.75781059,2);
    MoveObject(door7,1554.75109863,-1651.38012695,28.75781059,2);
    MoveObject(door8,1554.75109863,-1651.38012695,28.75781059,2);
}

public openbottomdoors()
{
    MoveObject(door1,1550.03906250,-1652.87011719,13.92138004,2);
    MoveObject(door2,1550.05053711,-1656.23083496,13.92253304,2);
    KillTimer(openbottomdoors1);
}
And I deleted your "#pragma tabsize 0" and fixed your indentation.
Is it too hard to hit TAB??
Reply
#3

thx Dude Credits here you come
Reply
#4

Quote:
Originally Posted by Jack_Rocker
Посмотреть сообщение
thx Dude Credits here you come
Anytime!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)