whats wrong
#1

if(FirstTime = true)
{
printf("The Bank Has Currently $%s To Give Away To Poor Players.", BankMoney);
FirstTime = false;
}

NewMoney = BankMoney;
OldMoney = BankMoney;

if(NewMoney > OldMoney)
{
printf("The Bank Has Currently $%s To Give Away To Poor Players.", BankMoney);
}

Whats wrong with this??!
Reply
#2

it looks like (for me it looks so with that piece of code)
NewMoney and OldMoney is the same so the if statment would never be true

And I think its hard to image your problem, maybe just explain whats not working so we dont need first so search whats not ok
Reply
#3

Ok look, this function is in a timer (ive put on the top firsttime = true ) so it displays its only once at the start as you can see. I want to check if the value in the ini changed, and then if it did, display the message again. Thats what i want.
Reply
#4

than post next time a complete script with headers :S or say where it belongs too (how you did now)

pawn Код:
public Timer()
{
    static OldMoney = 0x7F800000;  
    new NewMoney = dini_Int("status.ini", "BankMoney");
    if(NewMoney > OldMoney)
    {
        printf("The Bank Has Currently $%s To Give Away To Poor Players.", NewMoney - OldMoney);
    }
    else if(OldMoney > NewMoney)
    {
        printf("The Bank Has Currently Lost $%s.", OldMoney - NewMoney);
    }
    OldMoney = NewMoney;
}
Now it will print something when the value got raised and when it got lowered
and you dont need to write each word with a big starting letter
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)