19.08.2009, 17:22
This Are The Errors:
And This Is The Line Where The Errors Are:
and here is all OnPlayerCommand Text:
Try To Help Me Please!
Код:
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.
Код:
x_nr = strtok(cmdtext, idx);
Код:
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; }