Help with a simple cmd
#1

Hi, what's up? I'm still learning pawn so I kinda know I did something wrong in the script.

It's the following error:

H:\samp03csvr_R2-2_win32\pawno\try.pwn(129) : error 033: array must be indexed (variable "-unknown-")

And the following code:

Quote:

COMMAND: setfightstyle(playerid, params[])
{

new fights;
if (sscanf(params, "s", fights))SendClientMessage(playerid, 0xFFFFFF, "Usage: /setfightstyle <fightstyle> type /fightlist for a list of styles");
else if(fights == GetPlayerFightingStyle(playerid)) SendClientMessage(playerid, 0xFFFFFF, "You already have that fightingstyle");
else
{
if(fights == "boxing") SendClientMessage(playerid, 0xFFFFFF, "Your style has been changed to boxing!"); SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
}

return 1;


}

I think my declaration of fights is wrong but I'm not sure. Could anyone of you explain me how it is supposed to be done?
Reply


Messages In This Thread
Help with a simple cmd - by waza75 - 07.04.2011, 14:35
Re: Help with a simple cmd - by Steve M. - 07.04.2011, 14:38
Re: Help with a simple cmd - by omer5198 - 07.04.2011, 14:38
Re: Help with a simple cmd - by waza75 - 07.04.2011, 14:41
Re: Help with a simple cmd - by Steve M. - 07.04.2011, 14:45
Re: Help with a simple cmd - by waza75 - 07.04.2011, 14:49
Re: Help with a simple cmd - by waza75 - 07.04.2011, 15:09
Re: Help with a simple cmd - by radhakr - 07.04.2011, 16:28
Re: Help with a simple cmd - by waza75 - 07.04.2011, 18:14
Re: Help with a simple cmd - by radhakr - 07.04.2011, 18:38
Re: Help with a simple cmd - by waza75 - 07.04.2011, 18:42
Re: Help with a simple cmd - by waza75 - 07.04.2011, 19:17
Re: Help with a simple cmd - by radhakr - 07.04.2011, 19:53

Forum Jump:


Users browsing this thread: 3 Guest(s)