undefined symbol
#1

PHP код:
        if(GetRNPCHealth(damagedid) < 0.0 && !rnpcData[damagedid][RNPC_DEAD])
        {
CreateLootsZombie(item[],fPos[0],fPos[1],fPos[2]);

Код:
error 017: undefined symbol "item"
PHP код:
function CreateLootsZombie(item[],Float:pXX,Float:pYX,Float:pZX)
{
    new 
strt[128];
    
lootCount += 1;
    
Loot[lootCount][xLootdropZ] = pXX;
    
Loot[lootCount][yLootdropZ] = pYX;
    
Loot[lootCount][zLootdropZ] = pZX;
    
Loot[lootCount][AntiDup] = 1;
    
format(Loot[lootCount][lootDrop], 128"%s"item);
    
    
Loot[lootCount][LootID] = CreateDynamicObject(2907/*DayZSA_SelectObj()*/,pXX+0.3,pYX+float(1),pZX-0.7,0.0,0.0,0.0,-1,-1,-1,1000.0);
    
format(strt,sizeof(strt),""COL_GREEN"ACTION\n"COL_WHITE"PRESS N");
    
Loot[lootCount][TextID] = CreateDynamic3DTextLabel(strt,-1,pXX+0.3,pYX+float(1),pZX-0.7,8.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,1,-1,-1,-18.0);
    return 
1;

Do you know why this is not working?
Reply
#2

Get rid of the square brackets when calling functions.

Right code:
pawn Код:
CreateLootsZombie(item,fPos[0],fPos[1],fPos[2]);
Reply
#3

Quote:
Originally Posted by VVWVV
Посмотреть сообщение
Get rid of the square brackets when calling functions.

Right code:
pawn Код:
CreateLootsZombie(item,fPos[0],fPos[1],fPos[2]);
I have already try this, still undefined symbol. item
Reply
#4

Quote:
Originally Posted by Zeus666
Посмотреть сообщение
I have already try this, still undefined symbol. item
I think you just need to pass a string.

pawn Код:
CreateLootsZombie("String",fPos[0],fPos[1],fPos[2]);
Reply
#5

It's wrong, those are the parameters where you defined the "CreateLootsZombie" callback.

Show the complete code where it is "if(GetRNPCHealth(damagedid) < 0.0 && !rnpcData[damagedid][RNPC_DEAD])
{
CreateLootsZombie(item[],fPos[0],fPos[1],fPos[2]);
}"
Reply
#6

A reminder that you need to put the CreateLootsZombie(...) above so it could be used among the script.

Also you didn’t specify an index for item[] when you used it.
Reply
#7

Why did you put that?
Код:
CreateLootsZombie(item[],fPos[0],fPos[1],fPos[2]);
you need to define item[]
Reply
#8

well pwn is asking u what its "item"
you need to make a new item = getpvar or what it defines.

for example
Код:
            new id = GetPVarInt(playerid, "BizzEnter");
			if(!GetCloseBizzSafe(playerid, id)) return error(playerid, "You aren't near a biz-safe!");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)