SA-MP Forums Archive
Command help: /agivevehiclelicense - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Command help: /agivevehiclelicense (/showthread.php?tid=186304)



Command help: /agivevehiclelicense - Bates - 28.10.2010

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


Re: Command help: /agivevehiclelicense - DeathOnaStick - 28.10.2010

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]


Re: Command help: /agivevehiclelicense - Bates - 28.10.2010

Код:
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.



Re: Command help: /agivevehiclelicense - DeathOnaStick - 28.10.2010

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.


Re: Command help: /agivevehiclelicense - Mean - 28.10.2010

I think he forgot a closed brace "}" somewhere


Re: Command help: /agivevehiclelicense - Bates - 28.10.2010

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.


Re: Command help: /agivevehiclelicense - Mike_Peterson - 28.10.2010

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 <<< +++ --- ||||


Re: Command help: /agivevehiclelicense - Hamza' - 28.10.2010

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.


Re: Command help: /agivevehiclelicense - ••• ĤБĶБM ••• - 28.10.2010

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


Re: Command help: /agivevehiclelicense - Hamza' - 28.10.2010

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..