Raised This Month: $ Target: $400
 0% 

Plugin not compile [ZPS]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ORdli
Member
Join Date: Nov 2021
Old 01-23-2024 , 16:29   Re: Plugin not compile [ZPS]
Reply With Quote #1

Quote:
Originally Posted by Grey83 View Post
PHP Code:
#pragma semicolon 1
#pragma newdecls required

#include <sdktools_functions>

bool bShow;

public 
void OnMapStart()
{
    
CreateTimer(1.0Timer_HP_TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);

    
HookEvent("round_begins"Event_RoundEventHookMode_PostNoCopy);
    
HookEvent("round_win"Event_RoundEventHookMode_PostNoCopy);
}

public 
void Event_Round(Event event, const char[] namebool dontBroadcast)
{
    
bShow name[6] == 'b';
}

public 
Action Timer_HP(Handle timer)
{
    if(!
bShow)
        return 
Plugin_Continue;

    static 
char cls[16];
    for(
int i 1aim<= MaxClientsi++)
        if(
IsClientInGame(i) && !IsFakeClient(i) && IsPlayerAlive(i)
        && (
aim GetClientAimTarget(ifalse)) > MaxClients && GetEntityClassname(aimclssizeof(cls))
        && (!
strncmp(cls"func_breakable"14false) || (!strncmp(cls"prop_physics"12false)))
            
PrintHintText("Health [ %d / %d ]"GetEntProp(aimProp_Data"m_iHealth"), GetEntProp(aimProp_Data"m_iMaxHealth"));

    return 
Plugin_Continue;



plugin not compile

/groups/sourcemod/upload_tmp/textU0FRni.sp(31) : error 001: expected token: ")", but found "-identifier-"

1 Error

Last edited by ORdli; 01-23-2024 at 16:30. Reason: have error
ORdli is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 01-24-2024 , 07:07   Re: Plugin not compile [ZPS]
Reply With Quote #2

Quote:
Originally Posted by ORdli View Post
textU0FRni.sp(31) : error 001: expected token: ")", but found "-identifier-"
I forgot to add a closing parenthesis at the end of line 30
__________________
Grey83 is offline
101
Member
Join Date: Nov 2023
Old 01-26-2024 , 14:03   Re: Plugin not compile [ZPS]
Reply With Quote #3

Quote:
Originally Posted by Grey83 View Post
I forgot to add a closing parenthesis at the end of line 30
It was Perfect, but I prefer not to use a loop with many checks inside a short-time repeated timer . Creating a single timer for each human without looping or checking is very cheap , and once he disconnected he take the garbage.

Last edited by 101; 01-26-2024 at 14:17.
101 is offline
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

Forum Jump


All times are GMT -4. The time now is 05:02.


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