Random giveaway problem.
#1

Hi everyone, I am having a problem with a random giveaway for my drug system.
I made it so that after you start mining you are on a timer, after the timer ends you get a random amount of drug rocks.After I make the public function for the timer, my compiler crashes, if I remove it, the compiler works again.

My code.
pawn Код:
forward Mining(playerid);
public Mining(playerid)
{
    new rocks = random(1-10);
    PlayerInfo[playerid][Rocks] += rocks;
    return 1;
}
Any suggestions , if more code is needed, I will post it
Reply
#2

You're using random(1-10)
1-10 = -9
I think that's the reason it's crashing.
Reply
#3

Quote:
Originally Posted by Stinged
Посмотреть сообщение
You're using random(1-10)
1-10 = -9
I think that's the reason it's crashing.
I changed it to random(10) and it is still crashing, any other suggestions?
Reply
#4

Fixed, thanks, + rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)