Jump to content
  • 0

pomoc Problém s kódem.


Ironman1M

Dotaz

Ahoj, mám kódik z jedneho modu na nete kde všetky subory neboli skompilovane a boli k nim .inc subory. Všetko išlo až na jeden súbor, ls_apartments12.pwn a toto je chyba

../include/gl_common.inc(163) : error 028: invalid subscript (not an array or too many subscripts): "i"
../include/gl_common.inc(165) : error 001: expected token: "}", but found "if"
../include/gl_common.inc(165 -- 167) : error 029: invalid expression, assumed zero
../include/gl_common.inc(169) : error 017: undefined symbol "i"
../include/gl_common.inc(175) : error 054: unmatched closing brace ("}")
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.

Díky za pomoc a zatím čus 😁 ( Přikládám použitý gl_common.inc )

gl_common.inc

Edited by Ironman1M
Link to comment
Share on other sites

3 odpovědí na tuto otázku

Recommended Posts

  • 0
před 14 minutami, Ironman1M said:

Ahoj, mám kódik z jedneho modu na nete kde všetky subory neboli skompilovane a boli k nim .inc subory. Všetko išlo až na jeden súbor, ls_apartments12.pwn a toto je chyba


../include/gl_common.inc(163) : error 028: invalid subscript (not an array or too many subscripts): "i"
../include/gl_common.inc(165) : error 001: expected token: "}", but found "if"
../include/gl_common.inc(165 -- 167) : error 029: invalid expression, assumed zero
../include/gl_common.inc(169) : error 017: undefined symbol "i"
../include/gl_common.inc(175) : error 054: unmatched closing brace ("}")
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.

Díky za pomoc a zatím čus 😁 ( Přikládám použitý gl_common.inc )

gl_common.inc 4 kB · 0 downloads

Pawno nemám, takže si to nemohu zkompilovat, ale co jsem tak koukal, tak ti na řádku 161 chybí část cyklu for 😄 

stock PlaySoundForPlayersInRange(soundid, Float:range, Float:x, Float:y, Float:z)
{
	for(new i=0; i// Toto nahraď: for(new i = 0; i < MAX_PLAYERS; i++)
	{
    	if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i,range,x,y,z))
    	{
			PlayerPlaySound(i, soundid, x, y, z);
		}

	}

}

Asi bude třeba někde definovat tu konstantu MAX_PLAYERS, která by měla odpovídat počtu slotů na serveru. Už si nevzpomínám po těch letech jak to přesně fungovalo 😄

  • Paráda! (+1) 1
Link to comment
Share on other sites

  • 0

Po odstránení kodu na spode mám errory tieto 

C:\Users\Matej\Desktop\pawne\include\ls_beachside2.pwn(544) : error 017: undefined symbol "PlaySoundForPlayersInRange"
C:\Users\Matej\Desktop\pawne\include\ls_beachside2.pwn(556) : error 017: undefined symbol "PlaySoundForPlayersInRange"

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...