Weed system problem?
#1

Код:
C:\Users\N0FeaR\Desktop\New folder\gamemodes\IBP.pwn(2633) : error 039: constant symbol has no size
C:\Users\N0FeaR\Desktop\New folder\gamemodes\IBP.pwn(2635) : error 028: invalid subscript (not an array or too many subscripts): "WeedInfo"
C:\Users\N0FeaR\Desktop\New folder\gamemodes\IBP.pwn(2635) : warning 215: expression has no effect
C:\Users\N0FeaR\Desktop\New folder\gamemodes\IBP.pwn(2635) : error 001: expected token: ";", but found "]"
C:\Users\N0FeaR\Desktop\New folder\gamemodes\IBP.pwn(2635) : error 029: invalid expression, assumed zero
C:\Users\N0FeaR\Desktop\New folder\gamemodes\IBP.pwn(2635) : fatal error 107: too many error messages on one line
pawn Код:
}
forward SyncTime();
public SyncTime()
{
    new tmphour;
    new tmpminute;
    new tmpsecond;
    gettime(tmphour, tmpminute, tmpsecond);
    FixHour(tmphour);
    tmphour = shifthour;
    if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
    {
        for(new b = 0; b < sizeof(WeedInfo); b++)
        {
            if(WeedInfo[b][WeedPlanted] == 1 && WeedInfo[b][WeedTime] > 0)
            {
                WeedInfo[b][WeedTime] -= 1;
                if(WeedInfo[b][WeedTime] >= 17 && WeedInfo[b][WeedTime] <= 20)
                {
                    MoveDynamicObject(weedObject[b],WeedInfo[b][WeedX],WeedInfo[b][WeedY],WeedInfo[b][WeedZ]-2.2,100.0);
                }
                if(WeedInfo[b][WeedTime] >= 15 && WeedInfo[b][WeedTime] <= 17)
                {
                    MoveDynamicObject(weedObject[b],WeedInfo[b][WeedX],WeedInfo[b][WeedY],WeedInfo[b][WeedZ]-2.1,100.0);
                }
                if(WeedInfo[b][WeedTime] >= 13 && WeedInfo[b][WeedTime] <= 15)
                {
                    MoveDynamicObject(weedObject[b],WeedInfo[b][WeedX],WeedInfo[b][WeedY],WeedInfo[b][WeedZ]-2.0,100.0);
                }
                if(WeedInfo[b][WeedTime] >= 11 && WeedInfo[b][WeedTime] <= 13)
                {
                    MoveDynamicObject(weedObject[b],WeedInfo[b][WeedX],WeedInfo[b][WeedY],WeedInfo[b][WeedZ]-1.9,100.0);
                }
                if(WeedInfo[b][WeedTime] >= 9 && WeedInfo[b][WeedTime] <= 11)
                {
                    MoveDynamicObject(weedObject[b],WeedInfo[b][WeedX],WeedInfo[b][WeedY],WeedInfo[b][WeedZ]-1.8,100.0);
                }
                if(WeedInfo[b][WeedTime] >= 8 && WeedInfo[b][WeedTime] <= 9)
                {
                    MoveDynamicObject(weedObject[b],WeedInfo[b][WeedX],WeedInfo[b][WeedY],WeedInfo[b][WeedZ]-1.7,100.0);
                }
                if(WeedInfo[b][WeedTime] >= 7 && WeedInfo[b][WeedTime] <= 8)
                {
                    MoveDynamicObject(weedObject[b],WeedInfo[b][WeedX],WeedInfo[b][WeedY],WeedInfo[b][WeedZ]-1.6,100.0);
                }
                if(WeedInfo[b][WeedTime] >= 6 && WeedInfo[b][WeedTime] <= 7)
                {
                    MoveDynamicObject(weedObject[b],WeedInfo[b][WeedX],WeedInfo[b][WeedY],WeedInfo[b][WeedZ]-1.5,100.0);
                }
                if(WeedInfo[b][WeedTime] >= 5 && WeedInfo[b][WeedTime] <= 6)
                {
                    MoveDynamicObject(weedObject[b],WeedInfo[b][WeedX],WeedInfo[b][WeedY],WeedInfo[b][WeedZ]-1.4,100.0);
                }
                if(WeedInfo[b][WeedTime] >= 1 && WeedInfo[b][WeedTime] <= 5)
                {
                    MoveDynamicObject(weedObject[b],WeedInfo[b][WeedX],WeedInfo[b][WeedY],WeedInfo[b][WeedZ]-1.3,100.0);
                }
            }
        }
    }
}
Reply
#2

Could you please highlight in red what line it is?
Reply
#3

Quote:
Originally Posted by Akira297
Посмотреть сообщение
Could you please highlight in red what line it is?
pawn Код:
}
forward SyncTime();
public SyncTime()
{
    new tmphour;
    new tmpminute;
    new tmpsecond;
    gettime(tmphour, tmpminute, tmpsecond);
    FixHour(tmphour);
    tmphour = shifthour;
    if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
    {
[COLOR="Red"]        for(new b = 0; b < sizeof(WeedInfo); b++)[/COLOR]
        {
[COLOR="Red"]            if(WeedInfo[b][WeedPlanted] == 1 && WeedInfo[b][WeedTime] > 0)[/COLOR]
            {
                WeedInfo[b][WeedTime] -= 1;
                if(WeedInfo[b][WeedTime] >= 17 && WeedInfo[b][WeedTime] <= 20)
                {
                    MoveDynamicObject(weedObject[b],WeedInfo[b][WeedX],WeedInfo[b][WeedY],WeedInfo[b][WeedZ]-2.2,100.0);
                }
                if(WeedInfo[b][WeedTime] >= 15 && WeedInfo[b][WeedTime] <= 17)
                {
                    MoveDynamicObject(weedObject[b],WeedInfo[b][WeedX],WeedInfo[b][WeedY],WeedInfo[b][WeedZ]-2.1,100.0);
                }
                if(WeedInfo[b][WeedTime] >= 13 && WeedInfo[b][WeedTime] <= 15)
                {
                    MoveDynamicObject(weedObject[b],WeedInfo[b][WeedX],WeedInfo[b][WeedY],WeedInfo[b][WeedZ]-2.0,100.0);
                }
                if(WeedInfo[b][WeedTime] >= 11 && WeedInfo[b][WeedTime] <= 13)
                {
                    MoveDynamicObject(weedObject[b],WeedInfo[b][WeedX],WeedInfo[b][WeedY],WeedInfo[b][WeedZ]-1.9,100.0);
                }
                if(WeedInfo[b][WeedTime] >= 9 && WeedInfo[b][WeedTime] <= 11)
                {
                    MoveDynamicObject(weedObject[b],WeedInfo[b][WeedX],WeedInfo[b][WeedY],WeedInfo[b][WeedZ]-1.8,100.0);
                }
                if(WeedInfo[b][WeedTime] >= 8 && WeedInfo[b][WeedTime] <= 9)
                {
                    MoveDynamicObject(weedObject[b],WeedInfo[b][WeedX],WeedInfo[b][WeedY],WeedInfo[b][WeedZ]-1.7,100.0);
                }
                if(WeedInfo[b][WeedTime] >= 7 && WeedInfo[b][WeedTime] <= 8)
                {
                    MoveDynamicObject(weedObject[b],WeedInfo[b][WeedX],WeedInfo[b][WeedY],WeedInfo[b][WeedZ]-1.6,100.0);
                }
                if(WeedInfo[b][WeedTime] >= 6 && WeedInfo[b][WeedTime] <= 7)
                {
                    MoveDynamicObject(weedObject[b],WeedInfo[b][WeedX],WeedInfo[b][WeedY],WeedInfo[b][WeedZ]-1.5,100.0);
                }
                if(WeedInfo[b][WeedTime] >= 5 && WeedInfo[b][WeedTime] <= 6)
                {
                    MoveDynamicObject(weedObject[b],WeedInfo[b][WeedX],WeedInfo[b][WeedY],WeedInfo[b][WeedZ]-1.4,100.0);
                }
                if(WeedInfo[b][WeedTime] >= 1 && WeedInfo[b][WeedTime] <= 5)
                {
                    MoveDynamicObject(weedObject[b],WeedInfo[b][WeedX],WeedInfo[b][WeedY],WeedInfo[b][WeedZ]-1.3,100.0);
                }
            }
        }
    }
}
Reply
#4

No inside the
Код:
   COLOR THE LINE 
Reply
#5

Quote:
Originally Posted by Akira297
Посмотреть сообщение
No inside the
Код:
   COLOR THE LINE 
LOL is failed, but you see the line where is the error there is says [COLOR="Red"]
Reply
#6

What line is this,

Just highlight the line : (2635)
Reply
#7

Quote:
Originally Posted by Akira297
Посмотреть сообщение
What line is this,

Just highlight the line : (2635)
this line are 2635

pawn Код:
if(WeedInfo[b][WeedPlanted] == 1 && WeedInfo[b][WeedTime] > 0)
Reply
#8

Add " ; " after it and compile and tell me the new outcome.
Reply
#9

Quote:
Originally Posted by Akira297
Посмотреть сообщение
Add " ; " after it and compile and tell me the new outcome.
same problem.
Reply
#10

pawn Код:
for(new b = 0; b < sizeof(WeedInfo); b++)
       {
if(WeedInfo[b][WeedPlanted] == 1 && WeedInfo[b][WeedTime] > 0)
Why at the first line you have a blank array called "WeedInfo" and at the 3rd line you have it fulfilled ?
(That might be the problem)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)