function not working after another function
#1

I have two functions being called and the one below isn't actually called, so I set up some prints in the first one and found where it stops:

stops here and carries out the correct if statement
if(condition) /*variable and array assignations*/
else if(condition) /*variable and array assignations*/
else if(condition) /*variable and array assignations*/
else if(condition) /*variable and array assignations*/
else if(condition) /*variable and array assignations*/
not reaching here


The correct 'if' statement is executed and the arrays and variables are assigned but after those statements the next print doesn't show up.

This is something I haven't come across before so I just need to find out what it does, I was thinking It wasn't working because return was on the 'if's but it's not.

Thanks for any help
Reply
#2

post yyour code..
Reply
#3

Quote:
Originally Posted by gamer_Z
post yyour code..
Quote:
Originally Posted by [ĦŁ₣
ЉǾǖŦĦЗŁΛẄ ]

stops here and carries out the correct if statement
if(condition) /*variable and array assignations*/
else if(condition) /*variable and array assignations*/
else if(condition) /*variable and array assignations*/
else if(condition) /*variable and array assignations*/
else if(condition) /*variable and array assignations*/
not reaching here
Reply
#4

Quote:
Originally Posted by Joe Torran C
Quote:
Originally Posted by gamer_Z
post yyour code..
Quote:
Originally Posted by [ĦŁ₣
ЉǾǖŦĦЗŁΛẄ ]

stops here and carries out the correct if statement
if(condition) /*variable and array assignations*/
else if(condition) /*variable and array assignations*/
else if(condition) /*variable and array assignations*/
else if(condition) /*variable and array assignations*/
else if(condition) /*variable and array assignations*/
not reaching here
well that's an example of how it could be...
pawn Код:
if(a == 1)return 1; /*variable and array assignations*/
else if(a == 2)return 2; /*variable and array assignations*/
else if(a == 3)return 3; /*variable and array assignations*/
else if(a == 4)return 4; /*variable and array assignations*/
else if(a == 5)return 5; /*variable and array assignations*/
//everithing here will not be executed if(a > 0 && a < 6)
Reply
#5

Ok, I found it's not the if statements now, it's a vehicle loop that isn't working,

I know what I'm doing wrong just got to alter the size of the array:
pawn Код:
for(new v = 0; v < MAX_VEHICLES; v++)
    {
        printf("%d",v);
        SetVehicleVirtualWorld(DMvehicle[v], DEATHMATCH_WORLD);
    }
'DMvehicle' isnt the same as MAX_VEHICLES :P

Thanks for the quick replies though
Reply
#6

Quote:
Originally Posted by [ĦŁ₣
ЉǾǖŦĦЗŁΛẄ ]
Ok, I found it's not the if statements now, it's a vehicle loop that isn't working,

I know what I'm doing wrong just got to alter the size of the array:
pawn Код:
for(new v = 0; v < MAX_VEHICLES; v++)
    {
        printf("%d",v);
        SetVehicleVirtualWorld(DMvehicle[v], DEATHMATCH_WORLD);
    }
'DMvehicle' isnt the same as MAX_VEHICLES :P

Thanks for the quick replies though
so i think u used now sizeof(DMvehicle) :P
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)