Raised This Month: $ Target: $400
 0% 

Nothing appens after for(){}...


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
niubert
Junior Member
Join Date: Jul 2009
Location: France
Old 08-17-2009 , 14:14   Nothing appens after for(){}...
#1

Hy all.

I need your help to solve my problem. First excuse my english syntax, I'm french.


I have a bug, I use for{ in my script 3 or 4 times, and after the for(...){...} nothing appens. I tryed a search but I found nothing.

This is a code example :

PHP Code:
public Event_Player_Spawn(Handle:event, const String:name[], bool:dontBroadcast){
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    
    
n_CountPlayer();
    
    
//PrintToChat do not appen
    
PrintToChat(client"Nombre de joueurs : %i"n_playerCount);

PHP Code:
n_PlayerCount(){
    
n_playerCount 0;
    
    for(new 
1<= n_playerMaxi++)
    {
        if(
IsClientConnected(i) && IsClientInGame(i) && !IsFakeClient(i))
        {
            
n_playerCount++;
        }
    }

n_CountPlayer works perfect, and I must count them at player spawn, if I want execute code after the counting in a round_start event ! :/

Thx for your help !

Last edited by niubert; 08-17-2009 at 14:23.
niubert is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-17-2009 , 14:44   Re: Nothing appens after for(){}...
#2

You need to post in the SourceMod section.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Closed Thread



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

Forum Jump


All times are GMT -4. The time now is 15:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode