dcmd halp needed [ New to dcmd ] ( index out of bounds )
#1

so im trying to make a simple skin changer,

PHP Code:
#pragma tabsize 0
#include <a_samp>
#include <core>
#include <float>
#include "../include/gl_common.inc"
#define FILTERSCRIPT
#if defined FILTERSCRIPT
#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
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFFF
forward SendPlayerFormattedText(playerid, const str[], define);
//------------------------------------------------------------------------------------------------------
public OnFilterScriptInit()
{
print(
"\n--------------------------------------");
print(
"DCMD FilterScript");
print(
"--------------------------------------\n");
return 
1;
}
//------------------------------------------------------------------------------------------------------
dcmd_skin(const playerid,const params[]) {
    
#pragma unused params
    
new tmp[128];
    new 
skinid tmp[128];
     
SetPlayerSkin(playeridskinid);
       return 
true;
  }
public 
OnPlayerCommandText(playeridcmdtext[])
{
    
dcmd(skin,4,cmdtext);
    return 
0;
}
//-------------------------------------------------------------------------------------------------------
public SendPlayerFormattedText(playerid, const str[], define)
{
    new 
tmpbuf[256];
    
format(tmpbufsizeof(tmpbuf), strdefine);
    
SendClientMessage(playerid0xFF004040tmpbuf);
}
public 
OnFilterScriptExit()
{
print(
"dcmd FilterScript Unloaded");
return 
0;
}
#endif 
but im getting this

Code:
C:\Server\SA-MP_Server 3.0c\filterscripts\dcmd.pwn(37) : error 032: array index out of bounds (variable "tmp")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
i have only started coding in dcmd as of last night lol......

thanks.
Reply


Messages In This Thread
dcmd halp needed [ New to dcmd ] ( index out of bounds ) - by FluffyPawZ - 12.01.2011, 01:40
Re: dcmd halp needed [ New to dcmd ] ( index out of bounds ) - by Unknown1234 - 12.01.2011, 01:44

Forum Jump:


Users browsing this thread: 2 Guest(s)