SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 16/07/2011, 09:15 AM   #1
SamyRomafia
Huge Clucker
 
SamyRomafia's Avatar
 
Join Date: Oct 2010
Location: Italia
Posts: 232
Reputation: 3
Default Foreach

pawn Code:
/*--Other--*/
    foreach(Player) //4324
    {
        if ( PlayerToPoint(2.0, 1713.9775,-2486.5249,13.2817 ) )
        {
            if ( GetPlayerState( xi ) == PLAYER_STATE_DRIVER )
            {
                        ......
            }
            else
            {
                        ......
            }
        }
        return 1;
    }

I can't understand this warning:

Code:
C:\Users\Samy\Desktop\Tutto\SAMP MTA\SAMP\SCRIPT\DSR\gamemodes\DSR.pwn(4324) : warning 203: symbol is never used: "foreach"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
__________________
Hey guys.

I need a good scripter who can help me. I can pay for this work but im not a rich mean, i can pay as much as possible.
I need to configure a server whit a website, and other works, i tried to do this but my attempts have failed.
If you can help me send me a private message and i give you more info.

Thanks for your attention.
SamyRomafia is offline  
Old 16/07/2011, 09:17 AM   #2
Kitten
High-roller
 
Join Date: Jul 2010
Location: United States
Posts: 2,169
Reputation: 343
Default Re: Foreach

pawn Code:
foreach(Player,i)
Kitten is offline  
Old 16/07/2011, 09:21 AM   #3
Lorenc_
High-roller
 
Lorenc_'s Avatar
 
Join Date: Jan 2010
Location: Australia
Posts: 3,793
Reputation: 1177
Default Re: Foreach

pawn Code:
#define foreach(%1) for(new %1; %1 < MAX_PLAYERS; %1++)

By the looks of it, you don't have the include??
__________________
Join the best Cops And Robbers in SA-MP, today. svr.sfcnr.com:7777

Lorenc_ is offline  
Old 16/07/2011, 09:24 AM   #4
MoroDan
Huge Clucker
 
MoroDan's Avatar
 
Join Date: Jun 2011
Posts: 278
Reputation: 13
Default Re: Foreach

And this ?
PHP Code:
if ( PlayerToPoint(2.01713.9775,-2486.5249,13.2817 ) ) 
Where's the player parameter ?
MoroDan is offline  
 

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 HELP :-/ [H]265 Help Archive 3 10/06/2011 10:26 AM
Help with foreach ajwar Help Archive 2 12/02/2011 08:37 AM
Help with foreach NewbBeginner Help Archive 10 08/12/2010 05:56 PM
Foreach bug? armyoftwo Help Archive 3 30/10/2010 09:27 AM
for() vs foreach() The Scripter Help Archive 15 21/08/2010 12:43 AM


All times are GMT. The time now is 04:26 AM.


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