21.06.2009, 14:58
Quote:
Originally Posted by madmatty
Quote:
C:\Documents and Settings\matt\Desktop\SAMP LEARNING\gamemodes\learning.pwn(413) : warning 217: loose indentation C:\Documents and Settings\matt\Desktop\SAMP LEARNING\gamemodes\learning.pwn(409) : warning 203: symbol is never used: "idx" C:\Documents and Settings\matt\Desktop\SAMP LEARNING\gamemodes\learning.pwn(40 : warning 204: symbol is assigned a value that is never used: "tmp" C:\Documents and Settings\matt\Desktop\SAMP LEARNING\gamemodes\learning.pwn(408 -- 430) : warning 209: function "OnPlayerCommandText" should return a value Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[MAX_STRING]; new tmp[MAX_STRING]; new idx; cmd=strtok(text,idx); if (strcmp("/help", cmdtext, true, 10) == 0) { SendClientMessage(playerid,COLOR_YELLOW,"welcome to NWO number 1 cops and robbers"); SendClientMessage(playerid,COLOR_YELLOW,"/commands to see full list of commands"); SendClientMessage(playerid,COLOR_YELLOW,"/serverinfo to see full admin list and server host"); return 1; } if (strcmp("/commands", cmdtext, true, 10) == 0) { SendClientMessage(playerid,COLOR_YELLOW,"/police to see full list of police commands"); SendClientMessage(playerid,COLOR_YELLOW,"/rob to see full list of rob commands"); SendClientMessage(playerid,COLOR_YELLOW,"/medic to see full list of medic commands"); return 1; } } i deleted all the other like /arrest i mad and that coz it was bringing more errors up but once i get this sorted the /heal command should be sorted aswell |
#define MAX_STRING 128
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[MAX_STRING];
new tmp[MAX_STRING];
new idx;
cmd=strtok(text,idx);
stock sscanf(string[], format[], {Float,_}:...)
and the rest of the script that comes with stock sscanf work ok
i got a better solution if u know of a standard cops and robbers script that will help me will u please let me know
so i can look on how the basics work i have 1 but it just a tdm cops and robbers wi no cop commands or nothing