This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Solved Compiler crashed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SaraAki
Member
Join Date: Nov 2022
Old 05-12-2024 , 04:01   Compiler crashed
Reply With Quote #1

Why this plugin crash compiler?Also,online compiler is also crashed,it says:Awww! The compiler crashed! (Segfault)
Something seems to be very wrong in your code...
If you're sure that your code is correct,
you may have discovered a compiler bug...


PHP Code:
#include <amxmodx>
#include <fakemeta>

#define MAX_HOSTAGES 4
#define MAX_PHRASES 4

new g_phrases[MAX_HOSTAGES][MAX_PHRASES][] = {
    {
"scientist/c1a3_sci_atlast.wav""scientist/c1a3_sci_thankgod.wav""scientist/c1a2_sci_1zomb.wav"},
    {
"scientist/hello.wav""scientist/yesok.wav""scientist/doyousmell.wav""scientist/c1a3_sci_thankgod.wav"},
    {
"scientist/doyousmell.wav""scientist/dontwantdie.wav""scientist/gottogetout.wav""scientist/hellothere.wav"},
        {
"scientist/hellothere.wav""scientist/yesletsgo.wav""scientist/c1a3_sci_thankgod.wav""scientist/yesok.wav"}
}

new 
g_hostage_entity[] = "hostage_entity"
new g_hostages[MAX_HOSTAGES]

public 
plugin_precache() {
    for (new 
0MAX_HOSTAGES; ++i) {
        for (new 
0MAX_PHRASES; ++j) {
            
precache_sound(g_phrases[i][j])
        }
    }
}

public 
plugin_init() {
    
register_plugin("Hostage Voices""0.1.1""VEN")

    new 
ent = - 1count 0classname[] = "classname"
    
while (count MAX_HOSTAGES && (ent engfunc(EngFunc_FindEntityByStringentclassnameg_hostage_entity))) {
        
g_hostages[count] = ent
        count
++
    }

    
register_forward(FM_EmitSound"forward_emit_sound")
}

public 
forward_emit_sound(entitychannelsample[], Float:volumeFloat:attenuationflagspitch) {
    if (!
pev_valid(entity))
        return 
FMRES_IGNORED

    
new i
    
for (0MAX_HOSTAGES; ++i) {
        if (
g_hostages[i] == entity)
            break
    }

    if (
== MAX_HOSTAGES)
        return 
FMRES_IGNORED

    emit_sound
(entitychannelg_phrases[i][random(MAX_PHRASES)], volumeattenuationflagspitch)

    return 
FMRES_SUPERCEDE


Last edited by SaraAki; 05-13-2024 at 15:21. Reason: Solved
SaraAki is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 05-12-2024 , 06:57   Re: Compiler crashed
Reply With Quote #2

Look this
PHP Code:
#define MAX_PHRASES 4 
In first phrase you have only 3 sounds,just add 1 more sound.

PHP Code:
{"scientist/c1a3_sci_atlast.wav""scientist/c1a3_sci_thankgod.wav""scientist/c1a2_sci_1zomb.wav""HERE ADD SOUND"}, 
__________________
Check my original plugins for cs 1.6 and subscribe on channel
Look at the video bellow to see zombie frost grenade

https://youtu.be/j0zspNfN-AM?si=_1IiGPETN-GQY9Ua

Look at the video below to see Zombie blind grenade

https://youtu.be/ORC7ZmoaipQ?si=QC8Bul96QGitUwX4

Last edited by Krtola; 05-12-2024 at 06:58.
Krtola is offline
Send a message via Skype™ to Krtola
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 05-12-2024 , 10:54   Re: Compiler crashed
Reply With Quote #3

Did you try?
__________________
Check my original plugins for cs 1.6 and subscribe on channel
Look at the video bellow to see zombie frost grenade

https://youtu.be/j0zspNfN-AM?si=_1IiGPETN-GQY9Ua

Look at the video below to see Zombie blind grenade

https://youtu.be/ORC7ZmoaipQ?si=QC8Bul96QGitUwX4

Last edited by Krtola; 05-12-2024 at 10:54.
Krtola is offline
Send a message via Skype™ to Krtola
SaraAki
Member
Join Date: Nov 2022
Old 05-12-2024 , 14:32   Re: Compiler crashed
Reply With Quote #4

Yes,and now work.Thank you!
SaraAki is offline
Reply



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 19:16.


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