SA-MP Forums Archive
Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem (/showthread.php?tid=111730)



Problem - DSK_Vyorel - 03.12.2009

Код:
functionCD8(arg0, &arg1, arg2)
{
  new var0;
	new var1 = arg1;
	new var2[255];
  while(arg1 < var0 && arg0[arg1] != arg2 && arg1 - var1 < 254)
	{
    var2[arg1 - var1] = arg0[arg1];
		arg1++;
	}
  var2[arg1 - var1] = 0;
	if(arg1 < var0 && arg0[arg1] == arg2)
	{
		arg1++;
	}
}
Quote:

C:\Documents and Settings\Vyorel\Desktop\St.pwn(193) : error 028: invalid subscript (not an array or too many subscripts): "arg0"
C:\Documents and Settings\Vyorel\Desktop\St.pwn(193) : warning 215: expression has no effect
C:\Documents and Settings\Vyorel\Desktop\St.pwn(193) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Vyorel\Desktop\St.pwn(193) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Vyorel\Desktop\St.pwn(193) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Whi?


Re: Problem - GTA967 - 03.12.2009

you used arg0 as an array in your while statement so i think you need to change it from functionCD8(arg0, &arg1, arg2) to functionCD8(arg0[], &arg1, arg2)


Re: Problem - MJ! - 03.12.2009

You used DEAmx so the variables had inversed