[ Help ] GiftBox System
#1

Hello, I have error with my /dynamicgift, Everytime i compiled it

It shows :

Code:
C:\Documents and Settings\ADMIN\My Documents\SAGRP\gamemodes\HSRP.pwn(46484) : error 017: undefined symbol "SetPlayerPosEx"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Heres the PAWN Code:

Code:
CMD:dynamicgift(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1337)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessageEx(playerid, COLOR_GREY, "You must be on foot to use this command.");
            return 1;
        }

        new string[128], Float:Position[4];
        if(dynamicgift == 0)
        {
            GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
            GetPlayerFacingAngle(playerid, Position[3]);
            dynamicgift = CreateDynamicObject(19054, Position[0], Position[1], Position[2]-0.4, 0.0, 0.0, Position[3], -1, -1, -1, 200.0);
            dynamicgift3DText = CreateDynamic3DTextLabel("/getgift\nTogetagift.",COLOR_YELLOW,Position[0], Position[1], Position[2]+0.25,8.0);
            SetPlayerPosEx(playerid, Position[0], Position[1], Position[2]+3);
            format(string, sizeof(string), "AdmCmd: %s has placed the dynamic gift.", GetPlayerNameEx(playerid));
            ABroadCast( COLOR_LIGHTRED, string, 1337);
        }
        else
        {
            DestroyDynamicObject(dynamicgift);
            dynamicgift = 0;
            DestroyDynamic3DTextLabel( Text3D:dynamicgift3DText );
            format(string, sizeof(string), "AdmCmd: %s has destroyed the dynamic gift.", GetPlayerNameEx(playerid));
            ABroadCast( COLOR_LIGHTRED, string, 1337);
        }
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GRAD1, "You can not you this command.");
    }
    return 1;
}
What should i do?
Reply
#2

Quote:
Originally Posted by NexisHotel
View Post
Hello, I have error with my /dynamicgift, Everytime i compiled it

It shows :

Code:
C:\Documents and Settings\ADMIN\My Documents\SAGRP\gamemodes\HSRP.pwn(46484) : error 017: undefined symbol "SetPlayerPosEx"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Heres the PAWN Code:

Code:
CMD:dynamicgift(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1337)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessageEx(playerid, COLOR_GREY, "You must be on foot to use this command.");
            return 1;
        }

        new string[128], Float:Position[4];
        if(dynamicgift == 0)
        {
            GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
            GetPlayerFacingAngle(playerid, Position[3]);
            dynamicgift = CreateDynamicObject(19054, Position[0], Position[1], Position[2]-0.4, 0.0, 0.0, Position[3], -1, -1, -1, 200.0);
            dynamicgift3DText = CreateDynamic3DTextLabel("/getgift\nTogetagift.",COLOR_YELLOW,Position[0], Position[1], Position[2]+0.25,8.0);
            SetPlayerPosEx(playerid, Position[0], Position[1], Position[2]+3);
            format(string, sizeof(string), "AdmCmd: %s has placed the dynamic gift.", GetPlayerNameEx(playerid));
            ABroadCast( COLOR_LIGHTRED, string, 1337);
        }
        else
        {
            DestroyDynamicObject(dynamicgift);
            dynamicgift = 0;
            DestroyDynamic3DTextLabel( Text3D:dynamicgift3DText );
            format(string, sizeof(string), "AdmCmd: %s has destroyed the dynamic gift.", GetPlayerNameEx(playerid));
            ABroadCast( COLOR_LIGHTRED, string, 1337);
        }
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GRAD1, "You can not you this command.");
    }
    return 1;
}
What should i do?
Define this near ur other stocks

pawn Code:
stock SetPlayerPosEx(playerid, Float:x ,Float:y,Float:z,Float:a,interior,vw)
{
    SetPlayerPos(playerid , x , y ,z);
    SetPlayerFacingAngle(playerid, a);
    SetPlayerInterior(playerid, interior);
    SetPlayerVirtualWorld(playerid, vw);
    return 1;
}
Reply
#3

Well its work, But it gives me a Warning..

Code:
C:\Documents and Settings\ADMIN\My Documents\SAGRP\gamemodes\HSRP.pwn(46492) : warning 202: number of arguments does not match definition
C:\Documents and Settings\ADMIN\My Documents\SAGRP\gamemodes\HSRP.pwn(46492) : warning 202: number of arguments does not match definition
C:\Documents and Settings\ADMIN\My Documents\SAGRP\gamemodes\HSRP.pwn(46492) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
Reply
#4

Quote:
Originally Posted by NexisHotel
View Post
Well its work, But it gives me a Warning..

Code:
C:\Documents and Settings\ADMIN\My Documents\SAGRP\gamemodes\HSRP.pwn(46492) : warning 202: number of arguments does not match definition
C:\Documents and Settings\ADMIN\My Documents\SAGRP\gamemodes\HSRP.pwn(46492) : warning 202: number of arguments does not match definition
C:\Documents and Settings\ADMIN\My Documents\SAGRP\gamemodes\HSRP.pwn(46492) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
Rather using SetPlayerPosEx use SetPlayerPos since it is already defined in compiler unless you want some changes on SetPlayerPos create your own stock function. I personally suggest you to use SetPlayerPos though to get rid of troublemaker errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)