Errors.
#1

pawn Код:
C:\Users\o\Desktop\BDRP TRD\gamemodes\TRD.pwn(295) : error 001: expected token: ")", but found "["
C:\Users\o\Desktop\BDRP TRD\gamemodes\TRD.pwn(295) : error 029: invalid expression, assumed zero
C:\Users\o\Desktop\BDRP TRD\gamemodes\TRD.pwn(295) : warning 215: expression has no effect
C:\Users\o\Desktop\BDRP TRD\gamemodes\TRD.pwn(295) : error 001: expected token: ";", but found "]"
C:\Users\o\Desktop\BDRP TRD\gamemodes\TRD.pwn(295) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
pawn Код:
stock GetDruggInfo(playerid, slot)
{
    new info[64];
    if(PlayerInfo[playerid][pDrug][slot] == 0) // line 295
    {
        info = "Empty";
    }
    else
    {
        format(info, sizeof(info), "%s(%d)", GetDrugName(PlayerInfo[playerid][pDrug][slot]), PlayerInfo[playerid][pDrugAmount][slot]);
    }
    return info;
}
any ideas?
Reply
#2

Aqui:

Код:
if(PlayerInfo[playerid][pDrug][slot] == 0) // line 295
Mude para:
Код:
if(PlayerInfo[playerid][pDrug][slot] == 0); // line 295
Reply
#3

Quote:
Originally Posted by Mtfz13
Посмотреть сообщение
Aqui:

Код:
if(PlayerInfo[playerid][pDrug][slot] == 0) // line 295
Mude para:
Код:
if(PlayerInfo[playerid][pDrug][slot] == 0); // line 295
Hell no, lol.

I honestly cant find anything wrong, can you post some lines above the line 295.
Reply
#4

PHP код:
info "Empty"
It doesn't work with an array nor a string.
In this case you simply should use strcat.
PHP код:
strcat(info"Empty"); 
Reply
#5

pawn Код:
stock AssignPlayerDrugs(playerid, str[])
{
    new wtmp[MAX_DRUGS][64];
    explode(wtmp,str,"|");
    for(new z = 1; z < MAX_DRUGS; z++)
    {
        new wtmp2[2][64];
        /*Has to be minus 1, don't touch*/
        explode(wtmp2,wtmp[z-1],"=");
        PlayerInfo[playerid][pDrug][z] = strval(wtmp2[0]);
        PlayerInfo[playerid][pDrugAmount][z] = strval(wtmp2[1]);
    }
}
Lines above 295
Reply
#6

Can you try doing this instead?
Код:
stock GetDruggInfo(playerid, slot)
{
	new info[64];
 	if(slot == 0)
  	{
		if(PlayerInfo[playerid][pDrug]) // line 295
		{
			info = "Empty";
		}
		else
		{
			format(info, sizeof(info), "%s(%d)", GetDrugName(PlayerInfo[playerid][pDrug][slot]), PlayerInfo[playerid][pDrugAmount][slot]);
		}
	}
	return info;
}
Tell me if it works, I don't really know what "slot" does for you but you may have to remove [slot] from your format.
Reply
#7

Nothing is working. It's strange because it works perfectly in another script. I don't know if it's an include missing causing it.
Reply
#8

fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)