Command help: /agivevehiclelicense
#1

Hi again!

Sorry if i'm bugging you, but i need help. Hopefully i will learn to script better as the time goes.

pawn Код:
command(agivevehiclelicense, playerid, params[])
{
    new id, string [128];
    if( sscanf( params, "u", id) )
    {
        if( Player[playerid][AdminLevel] >= 3 )
        {
            SendClientMessage( playerid, SYNTAXMSG, "SYNTAX: /agivevehiclelicense [playerid]" );
        }
        else
        {
            SendClientMessage( playerid, SYNTAXMSG, "You are not authorized to use that command." );
        }
    }
    else
    {
        if( Player[playerid][AdminLevel] >= 3 )
        {
            if( IsPlayerConnectedEx( id ) )
            {
                if( Player[id][License] == 0 )
                {
                    format( string, sizeof( string ), "You has been given a vehicle license by administrator %s.", GetName( playerid ) );
                    SendClientMessage( id, WHITE, string );
                    format( string, sizeof( string ), "You gave %s a gehivle license.", GetName( id ) );
                    SendClientMessage( playerid, WHITE, string );
                    Player[id][License] = 1;
                }
                else
                {
                    SendClientMessage( playerid, SYNTAXMSG, "That player is already in possesion of a valid license." );
                }
            else
            {
                SendClientMessage( playerid, SYNTAXMSG, "That player is not connected / logged in." );
            }
        else
        {
            SendClientMessage( playerid, SYNTAXMSG, "You are not authroized to use that command." );
        }
    }
    return 1;
}
WHen compiling this i loads of errors, i can't understand what's wrong!

It's errors like " GivePlayerWeaponEx never used" etc.

Thanks in advance
Bates
Reply
#2

Quote:
Originally Posted by Bates
Посмотреть сообщение
Hi again!

Sorry if i'm bugging you, but i need help. Hopefully i will learn to script better as the time goes.

pawn Код:
command(agivevehiclelicense, playerid, params[])
{
    new id, string [128];
    if( sscanf( params, "u", id) )
    {
        if( Player[playerid][AdminLevel] >= 3 )
        {
            SendClientMessage( playerid, SYNTAXMSG, "SYNTAX: /agivevehiclelicense [playerid]" );
        }
        else
        {
            SendClientMessage( playerid, SYNTAXMSG, "You are not authorized to use that command." );
        }
    }
    else
    {
        if( Player[playerid][AdminLevel] >= 3 )
        {
            if( IsPlayerConnectedEx( id ) )
            {
                if( Player[id][License] == 0 )
                {
                    format( string, sizeof( string ), "You has been given a vehicle license by administrator %s.", GetName( playerid ) );
                    SendClientMessage( id, WHITE, string );
                    format( string, sizeof( string ), "You gave %s a gehivle license.", GetName( id ) );
                    SendClientMessage( playerid, WHITE, string );
                    Player[id][License] = 1;
                }
                else
                {
                    SendClientMessage( playerid, SYNTAXMSG, "That player is already in possesion of a valid license." );
                }
            else
            {
                SendClientMessage( playerid, SYNTAXMSG, "That player is not connected / logged in." );
            }
        else
        {
            SendClientMessage( playerid, SYNTAXMSG, "You are not authroized to use that command." );
        }
    }
    return 1;
}
WHen compiling this i loads of errors, i can't understand what's wrong!

It's errors like " GivePlayerWeaponEx never used" etc.

Thanks in advance
Bates
Post all errors that you get listed.

[gay]This forum requires that you wait 120 seconds between posts. Please try again in 45 seconds.[/gay]
Reply
#3

Код:
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(1949) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(2399) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(3028) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(3503) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(4141) : warning 202: number of arguments does not match definition
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(4478) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(4491) : error 017: undefined symbol "SaveGroups"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(4492) : error 017: undefined symbol "UpdateAnalysis"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(4493) : error 017: undefined symbol "SaveJobs"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(4494) : error 017: undefined symbol "SaveHouses"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(4495) : error 017: undefined symbol "SaveBusinesses"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(5775) : error 004: function "QuizText" is not implemented
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(5776) : error 004: function "QuizText" is not implemented
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(6412) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(7039) : error 004: function "GivePlayerWeaponEx" is not implemented
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(7051) : error 004: function "GivePlayerWeaponEx" is not implemented
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(7462) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(7469) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(7512) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(7544) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(7567) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(7770) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(7804) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(7838) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(8145) : error 004: function "GivePlayerWeaponEx" is not implemented
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(8166) : error 004: function "GivePlayerWeaponEx" is not implemented
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(8189) : error 004: function "GivePlayerWeaponEx" is not implemented

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


26 Errors.
Reply
#4

Quote:
Originally Posted by Bates
Посмотреть сообщение
Код:
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(1949) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(2399) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(3028) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(3503) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(4141) : warning 202: number of arguments does not match definition
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(4478) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(4491) : error 017: undefined symbol "SaveGroups"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(4492) : error 017: undefined symbol "UpdateAnalysis"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(4493) : error 017: undefined symbol "SaveJobs"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(4494) : error 017: undefined symbol "SaveHouses"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(4495) : error 017: undefined symbol "SaveBusinesses"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(5775) : error 004: function "QuizText" is not implemented
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(5776) : error 004: function "QuizText" is not implemented
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(6412) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(7039) : error 004: function "GivePlayerWeaponEx" is not implemented
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(7051) : error 004: function "GivePlayerWeaponEx" is not implemented
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(7462) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(7469) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(7512) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(7544) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(7567) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(7770) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(7804) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(7838) : error 017: undefined symbol "IsPlayerConnectedEx"
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(8145) : error 004: function "GivePlayerWeaponEx" is not implemented
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(8166) : error 004: function "GivePlayerWeaponEx" is not implemented
C:\Users\Gabriel\Desktop\VortexRoleplay\gamemodes\VortexRoleplay.pwn(8189) : error 004: function "GivePlayerWeaponEx" is not implemented

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


26 Errors.
Something tells me that you've copied this code from somewhere. You need to get the functions from the script you have copied it from, like IsPlayerConnectedEx and SaveHouses.
Reply
#5

I think he forgot a closed brace "}" somewhere
Reply
#6

Quote:
Originally Posted by DeathOnaStick
Посмотреть сообщение
Something tells me that you've copied this code from somewhere. You need to get the functions from the script you have copied it from, like IsPlayerConnectedEx and SaveHouses.
I did copy it from the same script.

There was another command called /betainvite. I copied it and edited it.
Reply
#7

I'm 100% sure hes missing a bracket }
find where u last scripted and before errors and put an extra bracket there
|||| --- +++ >>> GAY [47 seconds] GAY <<< +++ --- ||||
Reply
#8

pawn Код:
command(agivevehiclelicense, playerid, params[])
{
    new id, string [128];
    if( sscanf( params, "u", id) )
    {
        if( Player[playerid][AdminLevel] >= 3 )
        {
            SendClientMessage( playerid, SYNTAXMSG, "SYNTAX: /agivevehiclelicense [playerid]" );
        }
        else
        {
            SendClientMessage( playerid, SYNTAXMSG, "You are not authorized to use that command." );
        }
    }
    else
    {
        if( Player[playerid][AdminLevel] >= 3 )
        {
            if( IsPlayerConnectedEx( id ) )
            {
                if( Player[id][License] == 0 )
                {
                    format( string, sizeof( string ), "You has been given a vehicle license by administrator %s.", GetName( playerid ) );
                    SendClientMessage( id, WHITE, string );
                    format( string, sizeof( string ), "You gave %s a gehivle license.", GetName( id ) );
                    SendClientMessage( playerid, WHITE, string );
                    Player[id][License] = 1;
                }
                else
                {
                    SendClientMessage( playerid, SYNTAXMSG, "That player is already in possesion of a valid license." );
                }
            }
            else
            {
                SendClientMessage( playerid, SYNTAXMSG, "That player is not connected / logged in." );
            }
        else
        {
            SendClientMessage( playerid, SYNTAXMSG, "You are not authroized to use that command." );
        }
    }
    return 1;
}
Try that out.
Reply
#9

The 26 errors is a common error, which explains that there is a missing bracket at the end of the script.
Reply
#10

Quote:
Originally Posted by ••• ĤБĶБM •••
Посмотреть сообщение
The 26 errors is a common error, which explains that there is a missing bracket at the end of the script.
Yeah, that's why I added the missed bracket in his script..
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)