21.07.2010, 07:43
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
Lines
randomAnswer and randomMoney
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.
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;
}
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}
};