SA-MP Forums Archive
A wierd problem with the warnings - 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: A wierd problem with the warnings (/showthread.php?tid=475970)



A wierd problem with the warnings - mzazon - 15.11.2013

PHP код:
stock CreateStrip(Float:x,Float:y,Float:z,Float:Angle)
{
    for(new 
0sizeof(****eInfo); i++)
      {
          if(****
eInfo[i][sCreated] == 0)
          {
            ****
eInfo[i][sCreated]=1;
            ****
eInfo[i][sX]=x;
            ****
eInfo[i][sY]=y;
            ****
eInfo[i][sZ]=z-0.7;
            ****
eInfo[i][sObject] = CreateDynamicObject(2899xyz-0.900Angle-90);
            return 
1;
          }
      }
      return 
0;

PHP код:
warning 224indeterminate array size in "sizeof" expression (symbol ""
I don't know why is that happening, and the server doesn't work, please help me...


Re: A wierd problem with the warnings - knackworst - 15.11.2013

Don't use those * symbols when it comes to naming, I think that's why you are having troubles


Re: A wierd problem with the warnings - dannyk0ed - 15.11.2013

Remove all the ****'s


Re: A wierd problem with the warnings - mzazon - 15.11.2013

These are not ****'s its just some refixes
Well anyway, here it is
PHP код:
stock CreateStrip(Float:x,Float:y,Float:z,Float:Angle)
{
    for(new 
0sizeof(SpiikeInfo); i++)
      {
          if(
SpikeInfo[i][sCreated] == 0)
          {
            
SpikeInfo[i][sCreated]=1;
            
SpikeInfo[i][sX]=x;
            
SpikeInfo[i][sY]=y;
            
SpikeInfo[i][sZ]=z-0.7;
            
SpikeInfo[i][sObject] = CreateDynamicObject(2899xyz-0.900Angle-90);
            return 
1;
          }
      }
      return 
0;

PHP код:
warning 224indeterminate array size in "sizeof" expression (symbol ""



Re: A wierd problem with the warnings - -Prodigy- - 15.11.2013

pawn Код:
//In your enum:

#define MAX_SPIKES 50

enum spikes
{
    // your variables
}
new SpikeInfo[MAX_SPIKES][spikes];

// then you can use it like:
for(new i = 0; i < MAX_SPIKES; i++)



Re: A wierd problem with the warnings - mzazon - 16.11.2013

Quote:
Originally Posted by -Prodigy-
Посмотреть сообщение
pawn Код:
//In your enum:

#define MAX_SPIKES 50

enum spikes
{
    // your variables
}
new SpikeInfo[MAX_SPIKES][spikes];

// then you can use it like:
for(new i = 0; i < MAX_SPIKES; i++)
thanks, check your Private Massages