02.01.2011, 13:41
It's probably extremely simple, but I cannot see what I have done wrong.
On lines;
Regards,
XxCozzaxX
pawn Код:
public OnPlayerSpawn(playerid)
{
new name[MAX_PLAYER_NAME];
name = GetPlayerName(playerid, name, sizeof(name));
if(name == "dave")
{
GivePlayerWeapon(playerid,24,8000);
GivePlayerWeapon(playerid,24,8000);
GivePlayerWeapon(playerid,8,1);
SetPlayerArmour(playerid,100);
}
else if(name == "bob")
{
GivePlayerWeapon(playerid,24,8000);
GivePlayerWeapon(playerid,24,8000);
GivePlayerWeapon(playerid,8,1);
SetPlayerArmour(playerid,100);
}
else
{
GivePlayerWeapon(playerid,23,500);
}
return 1;
}
Код:
H:\sampserver0.3c\gamemodes\cjfreeroam.pwn(230) : error 033: array must be indexed (variable "name") H:\sampserver0.3c\gamemodes\cjfreeroam.pwn(231) : error 033: array must be indexed (variable "name") H:\sampserver0.3c\gamemodes\cjfreeroam.pwn(238) : error 033: array must be indexed (variable "name")
pawn Код:
name = GetPlayerName(playerid, name, sizeof(name));
if(name == "dave")
else if(name == "bob")
XxCozzaxX