SA-MP Forums Archive
Getting error on /destroybiz - 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: Getting error on /destroybiz (/showthread.php?tid=318804)



Getting error on /destroybiz - deltapro - 16.02.2012

I get few errors on this.. Please help me

Код:
(13101) : error 017: undefined symbol "Biz"
(13101) : warning 215: expression has no effect
13101) : error 001: expected token: ";", but found "]"
(13101) : error 029: invalid expression, assumed zero
(13101) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
pawn Код:
if(strcmp(cmd,"/destroybiz",true) == 0)//bizzes
        {
            if(PlayerInfo[playerid][power]>11)
            {
                new stringa[256],hf[64];
                for(new b = 0; b <= MAX_bizzes; b++)
                {
                    format(hf,sizeof(hf),"Businesses/%s.txt",b);
/*Line 13101*/          if(dini_Exists(hf) && IsPlayerInSphere(playerid,Biz[b][Biz_x],Biz[b][Biz_y],Biz[b][Biz_z],5))
                    {
                        format(stringa,sizeof(stringa),"Are you sure you want to delete house id %d",h);
                        ShowPlayerDialog(playerid,41,DIALOG_STYLE_MSGBOX,"Delete Biz",stringa,"Yes","No");
                        return 1;
                    }
                }
                return 1;
            }
        }



Re: Getting error on /destroybiz - [MG]Dimi - 16.02.2012

format(hf,sizeof(hf),"Businesses/%s.txt",b);
into
format(hf,sizeof(hf),"Businesses/%d.txt",b);

b is integer, not string so it will return very different file name. Give me IsPlayerInSphere