Errors!!!
#1

This Are The Errors:

Код:
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\sproba.pwn(234) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\sproba.pwn(234) : error 033: array must be indexed (variable "x_nr")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
And This Is The Line Where The Errors Are:

Код:
   	x_nr = strtok(cmdtext, idx);
and here is all OnPlayerCommand Text:

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/skill", cmdtext, true, 10) == 0)
	{
	if(IsSpawned[playerid] == 0) {
	SendClientMessage(playerid, COLOR_WHITE, "You are dead. You cannot use this command");
	return 1;
	}
	if(canchooseskill[playerid] == 0) {
	SendClientMessage(playerid, COLOR_WHITE, "You cannot use this command now. Only certain teams can use this at time of spawn");
  return 1;
  }
    	new x_nr[256];
    	x_nr = strtok(cmdtext, idx); -----------------------------> ERROR LINE
    	if(!strlen(x_nr)) {
    	SendClientMessage(playerid, COLOR_WHITE,"Use: /skill 1-6 to select your chosen skill. Default skill (Rapist) Will be given if you dont choose");
    	TextDrawShowForPlayer(playerid,Text:Textdraw0);
    	TextDrawShowForPlayer(playerid,Text:Textdraw1);
    	TextDrawShowForPlayer(playerid,Text:Textdraw2);
    	TextDrawShowForPlayer(playerid,Text:Textdraw3);
    	
    	return 1;
    	
			}
			if(strcmp(x_nr,"1",true) == 0) // Weapon Dealivery
			{
			SendClientMessage(playerid, COLOR_WHITE,"Type /commands to see your Skill/Job Commands!");
		  SendClientMessage(playerid,COLOR_WHITE, "Weapon Delivery: Your Job Is To Sell Weapons To Other Players For Earn Money! Type /commands To See Your Commands!");
		  
		  GivePlayerWeapon(playerid,5,1);
   		GivePlayerWeapon(playerid,22,100);
    	GivePlayerWeapon(playerid,14,1);
    	gTeam[playerid] = TEAM_GUNDEL;
    	SetPlayerToTeamColour(playerid);
    	canchooseskill[playerid] =0;
    	TextDrawHideForPlayer(playerid,Text:Textdraw0);
    	TextDrawHideForPlayer(playerid,Text:Textdraw1);
    	TextDrawHideForPlayer(playerid,Text:Textdraw2);
    	TextDrawHideForPlayer(playerid,Text:Textdraw3);
    	return 1;
			}
			else
			{
			SendClientMessage(playerid,COLOR_WHITE, "USAGE: /skill 1-6 To Choose Your Skill!");
			return 1;
			}
			}
			return 0;
}
Try To Help Me Please!



Reply


Messages In This Thread
Errors!!! - by Geekzor - 19.08.2009, 17:22
Re: Errors!!! - by Correlli - 19.08.2009, 17:24
Re: Errors!!! - by MenaceX^ - 19.08.2009, 17:28
Re: Errors!!! - by Geekzor - 19.08.2009, 18:05
Re: Errors!!! - by Correlli - 19.08.2009, 18:12
Re: Errors!!! - by Eazy_Efolife - 19.08.2009, 18:14
Re: Errors!!! - by Correlli - 19.08.2009, 18:22
Re: Errors!!! - by Eazy_Efolife - 19.08.2009, 18:58
Re: Errors!!! - by Correlli - 19.08.2009, 19:00
Re: Errors!!! - by Geekzor - 19.08.2009, 19:56

Forum Jump:


Users browsing this thread: 1 Guest(s)