SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 15/04/2015, 02:06 AM   #11
Abagail
High-roller
 
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,141
Reputation: 445
Default Re: foreach 0.4.1 standalone include

Good job releasing this as a standalone include again, - I hate how YSI dominates everything ****** produced, it's nice to see something he didn't force people into using with YSI still being worked on.
Abagail is offline   Reply With Quote
Old 05/09/2015, 11:27 AM   #12
Sasino97
Banned
 
Join Date: Dec 2010
Location: Soon Banned...
Posts: 1,392
Reputation: 127
Thumbs up Re: foreach 0.4.1 standalone include

Quote:
Originally Posted by Abagail View Post
Good job releasing this as a standalone include again, - I hate how YSI dominates everything ****** produced, it's nice to see something he didn't force people into using with YSI still being worked on.
This is the same thing I wanted to say lol
Sasino97 is offline   Reply With Quote
Old 29/09/2015, 12:34 AM   #13
n0minal
Banned
 
Join Date: Mar 2013
Location: Rio de Janeiro
Posts: 4,054
Reputation: 784
Default Re: foreach 0.4.1 standalone include

What's the proper way to use this version of foreach?

Code:
foreach(new playerid : Player)

or 

foreach(Vehicle, i)
What's the correct syntax of this version?

Sorry for the dumb question, I'm just updating my server includes...
n0minal is offline   Reply With Quote
Old 29/09/2015, 12:53 AM   #14
Crayder
Banned
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,331
Reputation: 652
Default Re: foreach 0.4.1 standalone include

Quote:
Originally Posted by ipsLeon View Post
What's the proper way to use this version of foreach?

Code:
foreach(new playerid : Player)

or 

foreach(Vehicle, i)
What's the correct syntax of this version?

Sorry for the dumb question, I'm just updating my server includes...
It uses the new syntax. The latest version (which must have YSI) is still the best though.
Crayder is offline   Reply With Quote
Old 29/09/2015, 01:04 AM   #15
n0minal
Banned
 
Join Date: Mar 2013
Location: Rio de Janeiro
Posts: 4,054
Reputation: 784
Default Re: foreach 0.4.1 standalone include

Quote:
Originally Posted by Crayder View Post
It uses the new syntax. The latest version (which must have YSI) is still the best though.
I'm getting this weird error when compiling with this syntax (not sure if it's the new or old):


Code:
                       foreach(new i : Vehicle)
				{
					static Float:vehPos[3];
					GetVehiclePos(i, vehPos[0], vehPos[1], vehPos[2]);
					if(distance(vehPos[0], vehPos[1], vehPos[2], x2, y2, z2) < 7.0) 	return false;
			
				}
Code:
error 017: undefined symbol "Vehicle@YSII_Ag"
Am I using a wrong syntax?
n0minal is offline   Reply With Quote
Old 29/09/2015, 01:36 AM   #16
Kar
Banned
 
Join Date: May 2010
Location: Black Asylum
Posts: 2,940
Reputation: 538
Default Re: foreach 0.4.1 standalone include

Did you create the Vehicle iter?
Kar is offline   Reply With Quote
Old 29/09/2015, 03:17 AM   #17
Abagail
High-roller
 
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,141
Reputation: 445
Default Re: foreach 0.4.1 standalone include

Vehicle isn't pre-defined with the new syntax, though Player is. That error means the iter doesn't exist in the current context.
Abagail is offline   Reply With Quote
Old 29/09/2015, 03:23 AM   #18
n0minal
Banned
 
Join Date: Mar 2013
Location: Rio de Janeiro
Posts: 4,054
Reputation: 784
Default Re: foreach 0.4.1 standalone include

Quote:
Originally Posted by Kar View Post
Did you create the Vehicle iter?
I didn't, sorry.
n0minal is offline   Reply With Quote
Old 29/09/2015, 04:50 AM   #19
Crayder
Banned
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,331
Reputation: 652
Default Re: foreach 0.4.1 standalone include

Quote:
Originally Posted by Abagail View Post
Vehicle isn't pre-defined with the new syntax, though Player is. That error means the iter doesn't exist in the current context.
Yes it is pre-defined, but not in this old standalone.

Quote:
Originally Posted by Kar View Post
Did you create the Vehicle iter?
Quote:
Originally Posted by ipsLeon View Post
I didn't, sorry.
The vehicle iterator is only in the YSI library version.
Crayder is offline   Reply With Quote
Old 07/01/2016, 02:44 PM   #20
Droxx
Big Clucker
 
Droxx's Avatar
 
Join Date: Dec 2015
Posts: 120
Reputation: 35
Default Re: foreach 0.4.1 standalone include

Good Job
Droxx is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Foreach include SkyLoKi Scripting Help 8 06/03/2015 03:48 PM
when i include foreach thats what i get.. KillerStrike23 Scripting Help 2 21/05/2014 01:26 PM
[Pedido] Include foreach Krusheer Português/Portuguese 0 26/04/2014 03:45 PM
[Ajuda] include foreach minimessi10 Português/Portuguese 7 27/03/2014 07:22 PM
[Pedido] Include SII foreach fackbook Português/Portuguese 5 16/01/2013 04:25 PM


All times are GMT. The time now is 11:11 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.