Uncommon problem with an array
#1

SOLVED
Hello community, I'm developing a new filterscript (the second version of Sasinosoft Houses, remade from scratch), but I have a very strange and uncommon issue.

At the beginning I defined:
pawn Code:
#define INVALID_HOUSE_ID -255
new LastHouse[MAX_PLAYERS];
Then under OnPlayerConnect I put:

pawn Code:
public OnPlayerConnect(playerid)
{
    LastHouse[playerid] = INVALID_HOUSE_ID;
        printf("LastHouse(%d) = %d", playerid, LastHouse[playerid]);
    return 1;
}
And the program will print to the console:
Code:
[19:47:10] [join] Sasino97 has joined the server (0:127.0.0.1)
[19:47:13] LastHouse(0) = 0
when it should be -255.... Another strange thing I noticed is that the second line is printed 3 seconds later.

I put the prints after noticing that error in the system.
Reply


Messages In This Thread
Uncommon problem with an array - by Sasino97 - 19.12.2012, 17:32
Re: Uncommon problem with an array - by Ballu Miaa - 19.12.2012, 17:57
Re: Uncommon problem with an array - by Sasino97 - 19.12.2012, 18:13
Re: Uncommon problem with an array - by [KHK]Khalid - 19.12.2012, 18:44
Re: Uncommon problem with an array - by Sasino97 - 19.12.2012, 18:53
Re: Uncommon problem with an array - by Ballu Miaa - 19.12.2012, 18:58
Re: Uncommon problem with an array - by [KHK]Khalid - 19.12.2012, 18:59
Re: Uncommon problem with an array - by Sasino97 - 19.12.2012, 18:59
Re: Uncommon problem with an array - by [KHK]Khalid - 19.12.2012, 19:06
Re: Uncommon problem with an array - by Sasino97 - 19.12.2012, 19:15

Forum Jump:


Users browsing this thread: 1 Guest(s)