[Help]Neon system errors
#1

Код:
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TR-RP\filterscripts\Neon.pwn(21) : error 001: expected token: "-identifier-", but found "public"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TR-RP\filterscripts\Neon.pwn(39) : error 017: undefined symbol "PlayerInfo"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TR-RP\filterscripts\Neon.pwn(39) : warning 215: expression has no effect
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TR-RP\filterscripts\Neon.pwn(39) : error 001: expected token: ";", but found "]"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TR-RP\filterscripts\Neon.pwn(39) : error 029: invalid expression, assumed zero
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TR-RP\filterscripts\Neon.pwn(39) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
pawn Код:
/*
||||||||||||||||||||||||||||||||||||||||
||Neon System By AlexzPro             ||
||Please keep the credits to me       ||
||Do not re-relase without permisssion||
||Enjoy!                              ||
||||||||||||||||||||||||||||||||||||||||
*/

#define FILTERSCRIPT
#define COLOR_WHITE 0xFFFFFFAA
#include <a_samp>
#define NEON 1337 // Dialogid
#if defined FILTERSCRIPT

enum pInfo
{

pJob2,
pCash,

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Neon System By AlexzPro");
    print("--------------------------------------\n");
    return 1;
}

#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/neon", cmdtext, true, 10) == 0)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
            {
                SendClientMessage(playerid, COLOR_WHITE, "      You are not the driver");
                if(PlayerInfo[playerid][pJob] != 7);
                SendClientMessage(playerid, COLOR_GREY, "   You are not a Mechanic !");
                return 1;
            }
            ShowPlayerDialog(playerid, NEON, DIALOG_STYLE_LIST, "Choose your neon colour","Blue\nGreen\nYellow\nWhite\nPink\nTurn off Neon","Add","Close");
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE, " You are not in a vehicle");
        }
        return 1;
    }
    return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == NEON)
    {
        if(response)
        {
            if(listitem == 0)
            {
                SetPVarInt(playerid, "neon", 1);
                SetPVarInt(playerid, "blue", CreateObject(18648,0,0,0,0,0,0));
                SetPVarInt(playerid, "blue1", CreateObject(18648,0,0,0,0,0,0));
                AttachObjectToVehicle(GetPVarInt(playerid, "blue"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                AttachObjectToVehicle(GetPVarInt(playerid, "blue1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                GameTextForPlayer(playerid, "~b~ Blue ~w~Neon has been added to your vehicle",3500,5);
            }
            if(listitem == 1)
            {
                SetPVarInt(playerid, "neon", 1);
                SetPVarInt(playerid, "green", CreateObject(18649,0,0,0,0,0,0));
                SetPVarInt(playerid, "green1", CreateObject(18649,0,0,0,0,0,0));
                AttachObjectToVehicle(GetPVarInt(playerid, "green"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                AttachObjectToVehicle(GetPVarInt(playerid, "green1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                GameTextForPlayer(playerid, "~g~Green ~w~Neon has been added to your vehicle",3500,5);
            }
            if(listitem == 2)
            {
                SetPVarInt(playerid, "neon", 1);
                SetPVarInt(playerid, "yellow", CreateObject(18650,0,0,0,0,0,0));
                SetPVarInt(playerid, "yellow1", CreateObject(18650,0,0,0,0,0,0));
                AttachObjectToVehicle(GetPVarInt(playerid, "yellow"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                AttachObjectToVehicle(GetPVarInt(playerid, "yellow1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                GameTextForPlayer(playerid, "~y~Yellow~w~ Neon has been added to your vehicle",3500,5);
            }
            if(listitem == 3)
            {
                SetPVarInt(playerid, "neon", 1);
                SetPVarInt(playerid, "white", CreateObject(18652,0,0,0,0,0,0));
                SetPVarInt(playerid, "white1", CreateObject(18652,0,0,0,0,0,0));
                AttachObjectToVehicle(GetPVarInt(playerid, "white"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                AttachObjectToVehicle(GetPVarInt(playerid, "white1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                GameTextForPlayer(playerid, "~w~White~w~ Neon has been added to your vehicle",3500,5);
            }
            if(listitem == 4)
            {
                SetPVarInt(playerid, "neon", 1);
                SetPVarInt(playerid, "pink", CreateObject(18651,0,0,0,0,0,0));
                SetPVarInt(playerid, "pink1", CreateObject(18651,0,0,0,0,0,0));
                AttachObjectToVehicle(GetPVarInt(playerid, "pink"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                AttachObjectToVehicle(GetPVarInt(playerid, "pink1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                GameTextForPlayer(playerid, "~p~Pink~w~ Neon has been added to your vehicle",3500,5);
            }
            if(listitem == 5)
            {
                DestroyObject(GetPVarInt(playerid, "blue"));
                DeletePVar(playerid, "neon");
                DestroyObject(GetPVarInt(playerid, "blue1"));
                DeletePVar(playerid, "neon");
                DestroyObject(GetPVarInt(playerid, "green"));
                DeletePVar(playerid, "neon");
                DestroyObject(GetPVarInt(playerid, "green1"));
                DeletePVar(playerid, "neon");
                DestroyObject(GetPVarInt(playerid, "yellow"));
                DeletePVar(playerid, "neon");
                DestroyObject(GetPVarInt(playerid, "yellow1"));
                DeletePVar(playerid, "neon");
                DestroyObject(GetPVarInt(playerid, "white"));
                DeletePVar(playerid, "neon");
                DestroyObject(GetPVarInt(playerid, "white1"));
                DeletePVar(playerid, "neon");
                DestroyObject(GetPVarInt(playerid, "pink"));
                DeletePVar(playerid, "neon");
                DestroyObject(GetPVarInt(playerid, "pink1"));
                DeletePVar(playerid, "neon");
                GameTextForPlayer(playerid, "~g~Neon was deleted from your vehicle",3500,5);
            }
        }
    }
    return 1;
}
Reply
#2

First of all Arnie! pJob2 is your PlayerInfo. Use that instead of pJob! and Give me line 21
Reply
#3

Line 21
pawn Код:
public OnFilterScriptInit()
Line 39
pawn Код:
if(PlayerInfo[playerid][pJob2] != 7);
Errors
Код:
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TR-RP\filterscripts\Neon.pwn(21) : error 001: expected token: "-identifier-", but found "public"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TR-RP\filterscripts\Neon.pwn(39) : error 017: undefined symbol "PlayerInfo"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TR-RP\filterscripts\Neon.pwn(39) : warning 215: expression has no effect
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TR-RP\filterscripts\Neon.pwn(39) : error 001: expected token: ";", but found "]"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TR-RP\filterscripts\Neon.pwn(39) : error 029: invalid expression, assumed zero
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TR-RP\filterscripts\Neon.pwn(39) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Hey,Ballu i have fixed my GM no more bugs.Hhaa.i fixed my self with a help of helper in forum.sa-mp.com
Reply
#4

I have fix line 21 and this come
Код:
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TR-RP\filterscripts\Neon.pwn(38) : error 017: undefined symbol "PlayerInfo"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TR-RP\filterscripts\Neon.pwn(38) : warning 215: expression has no effect
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TR-RP\filterscripts\Neon.pwn(38) : error 001: expected token: ";", but found "]"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TR-RP\filterscripts\Neon.pwn(38) : error 029: invalid expression, assumed zero
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TR-RP\filterscripts\Neon.pwn(38) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#5

Ok,Now i got warning and 1 error
pawn Код:
if(PlayerInfo[playerid][pJob] != 7);
Код:
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TR-RP\filterscripts\Neon.pwn(39) : error 036: empty statement
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TR-RP\filterscripts\Neon.pwn(45) : warning 225: unreachable code
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#6

How can i fix the warning
Код:
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TR-RP\filterscripts\Neon.pwn(45) : warning 225: unreachable code
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
pawn Код:
ShowPlayerDialog(playerid, NEON, DIALOG_STYLE_LIST, "Choose your neon colour","Blue\nGreen\nYellow\nWhite\nPink\nTurn off Neon","Add","Close");
THis is the line
Reply
#7

Код:
/*
||||||||||||||||||||||||||||||||||||||||
||Neon System By AlexzPro             ||
||Please keep the credits to me       ||
||Do not re-relase without permisssion||
||Thank's To FaD For Fixing Error's   ||
||Enjoy!                              ||
||||||||||||||||||||||||||||||||||||||||
*/
#define FILTERSCRIPT
#define COLOR_WHITE 0xFFFFFFAA
#include <a_samp>
#define NEON 1337 // Dialogid
#define COLOR_GREY 0xFFFFFFFAA
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Neon System By AlexzPro");
    print("--------------------------------------\n");
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/neon", cmdtext, true, 10) == 0)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
            {
                SendClientMessage(playerid, COLOR_WHITE, "      You are not the driver");
                return 1;
            }
            ShowPlayerDialog(playerid, NEON, DIALOG_STYLE_LIST, "Choose your neon colour","Blue\nGreen\nYellow\nWhite\nPink\nTurn off Neon","Add","Close");
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE, " You are not in a vehicle");
        }
        return 1;
    }
    return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == NEON)
    {
        if(response)
        {
            if(listitem == 0)
            {
                SetPVarInt(playerid, "neon", 1);
                SetPVarInt(playerid, "blue", CreateObject(18648,0,0,0,0,0,0));
                SetPVarInt(playerid, "blue1", CreateObject(18648,0,0,0,0,0,0));
                AttachObjectToVehicle(GetPVarInt(playerid, "blue"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                AttachObjectToVehicle(GetPVarInt(playerid, "blue1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                GameTextForPlayer(playerid, "~b~ Blue ~w~Neon has been added to your vehicle",3500,5);
            }
            if(listitem == 1)
            {
                SetPVarInt(playerid, "neon", 1);
                SetPVarInt(playerid, "green", CreateObject(18649,0,0,0,0,0,0));
                SetPVarInt(playerid, "green1", CreateObject(18649,0,0,0,0,0,0));
                AttachObjectToVehicle(GetPVarInt(playerid, "green"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                AttachObjectToVehicle(GetPVarInt(playerid, "green1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                GameTextForPlayer(playerid, "~g~Green ~w~Neon has been added to your vehicle",3500,5);
            }
            if(listitem == 2)
            {
                SetPVarInt(playerid, "neon", 1);
                SetPVarInt(playerid, "yellow", CreateObject(18650,0,0,0,0,0,0));
                SetPVarInt(playerid, "yellow1", CreateObject(18650,0,0,0,0,0,0));
                AttachObjectToVehicle(GetPVarInt(playerid, "yellow"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                AttachObjectToVehicle(GetPVarInt(playerid, "yellow1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                GameTextForPlayer(playerid, "~y~Yellow~w~ Neon has been added to your vehicle",3500,5);
            }
            if(listitem == 3)
            {
                SetPVarInt(playerid, "neon", 1);
                SetPVarInt(playerid, "white", CreateObject(18652,0,0,0,0,0,0));
                SetPVarInt(playerid, "white1", CreateObject(18652,0,0,0,0,0,0));
                AttachObjectToVehicle(GetPVarInt(playerid, "white"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                AttachObjectToVehicle(GetPVarInt(playerid, "white1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                GameTextForPlayer(playerid, "~w~White~w~ Neon has been added to your vehicle",3500,5);
            }
            if(listitem == 4)
            {
                SetPVarInt(playerid, "neon", 1);
                SetPVarInt(playerid, "pink", CreateObject(18651,0,0,0,0,0,0));
                SetPVarInt(playerid, "pink1", CreateObject(18651,0,0,0,0,0,0));
                AttachObjectToVehicle(GetPVarInt(playerid, "pink"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                AttachObjectToVehicle(GetPVarInt(playerid, "pink1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                GameTextForPlayer(playerid, "~p~Pink~w~ Neon has been added to your vehicle",3500,5);
            }
            if(listitem == 5)
            {
                DestroyObject(GetPVarInt(playerid, "blue"));
                DeletePVar(playerid, "neon");
                DestroyObject(GetPVarInt(playerid, "blue1"));
                DeletePVar(playerid, "neon");
                DestroyObject(GetPVarInt(playerid, "green"));
                DeletePVar(playerid, "neon");
                DestroyObject(GetPVarInt(playerid, "green1"));
                DeletePVar(playerid, "neon");
                DestroyObject(GetPVarInt(playerid, "yellow"));
                DeletePVar(playerid, "neon");
                DestroyObject(GetPVarInt(playerid, "yellow1"));
                DeletePVar(playerid, "neon");
                DestroyObject(GetPVarInt(playerid, "white"));
                DeletePVar(playerid, "neon");
                DestroyObject(GetPVarInt(playerid, "white1"));
                DeletePVar(playerid, "neon");
                DestroyObject(GetPVarInt(playerid, "pink"));
                DeletePVar(playerid, "neon");
                DestroyObject(GetPVarInt(playerid, "pink1"));
                DeletePVar(playerid, "neon");
                GameTextForPlayer(playerid, "~g~Neon was deleted from your vehicle",3500,5);
            }
        }
    }
    return 1;
}
#endif
First Error = Endif b4 the code.. such as you written the endif code b4 the On playercommand so they will not run the Command's, so, try to add it at the end..

2nd Error You didnt define COLOR_GREY

3rd Error Try To Add Server Enum on GM Not on FS
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)