ERROR: Must be assigned to an array | with random messages
#1

I was trying to make it so it sends random messages and the player has to type that answer but when I compile it I get these errors
pawn Code:
C:\Servers\SA-MP\gamemodes\MS.pwn(1977 -- 1978) : error 006: must be assigned to an array
C:\Servers\SA-MP\gamemodes\MS.pwn(1978 -- 1979) : error 006: must be assigned to an array
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Lines
pawn Code:
public NewContest()
{
    new string[128]; //We're creating a new string here to inform players of the new number.
    ContestAnswer = randomAnswer //Line 1977
    CONTEST_PRIZE = randomMoney // Line 1978
    format(string,sizeof string,"The first person to type '%d' first, wins $%d.",ContestAnswer,CONTEST_PRIZE); // Line 1979
    SendClientMessageToAll(COLOR_CONTEST,string);
    return 1;
}
randomAnswer and randomMoney
pawn Code:
new randomAnswer[][0] =
{
{"Movie server lives!"},
{"Cobra is a hoe!"},
{"Mr.Beer is a hoe!"},
{"Sh4d0w is a hoe!"}
};
new randomMoney[][]=
{
{4000},
{2000},
{100},
{10000},
{1}
};
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)