SA-MP Forums Archive
ERRORSSSSSS - 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)
+--- Thread: ERRORSSSSSS (/showthread.php?tid=483451)



ERRORS ,please help - aboa - 26.12.2013

pawn Код:
C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\sarp.pwn(1975) : error 017: undefined symbol "DropInfo"
C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\sarp.pwn(1975) : error 036: empty statement
C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\sarp.pwn(1975) : error 017: undefined symbol "i"
C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\sarp.pwn(1975) : 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.
in that line typed:
pawn Код:
for(new i = 0; i < sizeof(DropInfo); i++)



but in that public :
pawn Код:
forward crackpick(playerid);
public crackpick(playerid)
{
    for(new i = 0; i < sizeof(DropInfo); i++)
    {
        if (PlayerToPoint(1.0,playerid,DropInfo[i][dx],DropInfo[i][dy],DropInfo[i][dz]))
        {
            if(GetPlayerVirtualWorld(playerid) == DropInfo[i][dWorld])
            {
                DestroyObject(DropObject[i]);
                DropInfo[i][dx] = 0.0;
                DropInfo[i][dy] = 0.0;
                DropInfo[i][dz] = 0.0;
                if(DropInfo[i][dType] == 5) // Crack
                {
                    new string[256];
                    format(string,sizeof(string),"* %s picks up %d grams of crack.",Name(playerid),DropInfo[i][dAmount]);
                    ProxDetector(30.0,playerid,string,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED);
                    PlayerInfo[playerid][pCrack] += DropInfo[i][dAmount][0];
                    DropInfo[i][dAmount][0] = 0;
                    DropInfo[i][dAmount][1] = 0;
                    DropInfo[i][dType] = 0;
                }
            }
        }
    }
}



Re: ERRORSSSSSS - aboa - 26.12.2013

?


Re: ERRORSSSSSS - Aliassassin123456 - 26.12.2013

Where you define 'DropInfo' ?


Re: ERRORSSSSSS - Zex Tan - 26.12.2013

Change your DropInfo to some sort of amount to attempt the loop, so is this basically a looting system? Where you pick things up and drop'em? Anyways, just add something like

pawn Код:
#define MAX_DROPS 150
and change your DropInfo to MAX_DROPS.


Re: ERRORSSSSSS - Aliassassin123456 - 26.12.2013

Quote:
Originally Posted by Zex Tan
Посмотреть сообщение
Change your DropInfo to some sort of amount to attempt the loop, so is this basically a looting system? Where you pick things up and drop'em? Anyways, just add something like

pawn Код:
#define MAX_DROPS 150
and change your DropInfo to MAX_DROPS.
NOPE, There isn't any different, sizeof(DropInfo) MUST response


Re: ERRORSSSSSS - aboa - 26.12.2013

Fixed