View Single Post
Author Message
bloodypizza
BANNED
Join Date: Nov 2005
Location: Slöinge,FALKENBG,SWE
Old 09-13-2006 , 19:34   PLZ help a stupid newbie! (COMPILING ERROR)
Reply With Quote #1

Hi, i tryed to compile this plugin, but got the error: <Path to cs amxx\scripting-shit>\osk.sma(29) : error 033: array must be indexed (variable "argp")

Code:
#include <amxmodx> #include <amxmisc> public plugin_init() {  register_plugin("Nameless","1.0","Oskar")  register_concmd("amx_test", "cmdSkit", ADMIN_SLAY, "<name or #userid>") } public cmdSkit(id, level, cid) {  // Do I have the right adminflags?  if (!cmd_access(id, level, cid, 2))   return PLUGIN_HANDLED  // Arguments, amx_test <argo (player)> <argp (times)>  new argo[32]  new argp[4]  read_argv(1,argo,31)  read_argv(2,argp,3)  // Get the player id  new arg = cmd_target(id, argo, 2)  // Will be only be used in the FOR code  new arge = 1  // If I wrote the name of a non-existing player, then why would I want the plugin to continue?  if (!arg)   return PLUGIN_HANDLED  /////////////////  //Do the function ej(arg) 1 time. The next time the FOR loop will run the  //function cl(arg) instead.  /////////////////  for (new i = 0; i < argp*2; i++)  {  if( arge == 1 )  {   arge = 2   set_task(i*2.0,"ej",arg)  }    else if( arge == 2 )  {   arge = 1   set_task(i*2.0,"cl",arg)  }  }  return PLUGIN_HANDLED } public ej(arg) {  client_cmd(arg,"plugin_doesnt_compile_right_on") } public cl(arg) {  client_cmd(arg,"plugin_doesnt_compile_right_off") }
bloodypizza is offline
Send a message via MSN to bloodypizza