hi im new to scripting and i need help
#9

Quote:
Originally Posted by madmatty
Quote:
Originally Posted by Don Correlli
pawn Код:
#define MAX_STRING 128
C:\Documents and Settings\matt\Desktop\SAMP LEARNING\gamemodes\learning.pwn(410) : error 017: undefined symbol "text"
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
So all together for dcmd i got
#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
Reply


Messages In This Thread
hi im new to scripting and i need help - by madmatty - 21.06.2009, 10:34
Re: hi im new to scripting and i need help - by mamorunl - 21.06.2009, 11:52
Re: hi im new to scripting and i need help - by madmatty - 21.06.2009, 12:10
Re: hi im new to scripting and i need help - by madmatty - 21.06.2009, 12:38
Re: hi im new to scripting and i need help - by Correlli - 21.06.2009, 13:04
Re: hi im new to scripting and i need help - by madmatty - 21.06.2009, 14:15
Re: hi im new to scripting and i need help - by Correlli - 21.06.2009, 14:37
Re: hi im new to scripting and i need help - by madmatty - 21.06.2009, 14:45
Re: hi im new to scripting and i need help - by madmatty - 21.06.2009, 14:58
Re: hi im new to scripting and i need help - by MadeMan - 21.06.2009, 15:39

Forum Jump:


Users browsing this thread: 2 Guest(s)