Raised This Month: $32 Target: $400
 8% 

roundsound error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MrGarfield
Senior Member
Join Date: Feb 2013
Old 01-19-2020 , 13:27   roundsound error
Reply With Quote #1

good evening

I just toruver this plugin https://forums.alliedmods.net/showthread.php?p=1136844
and modify like this

Code:
#include <amxmodx>

public plugin_init()
{
    register_plugin(0, "1.0", "PaintLancer");
    register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin");
    register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin");
    return 0;
}

public t_win()
{
    new rand = random_num(0, 2);
    client_cmd(0, "stopsound");
    switch (rand)
    {
        case 0:
        {
            client_cmd(0, "spk LTBJail/T_Winnar_1");
        }
        case 1:
        {
            client_cmd(0, "spk LTBJail/T_Winnar_2");
        }
        case 2:
        {
            client_cmd(0, "spk LTBJail/T_Winnar_3");
        }
        default:
        {
        }
    }
    return 1;
}

public ct_win()
{
    new rand = random_num(0, 2);
    client_cmd(0, "stopsound");
    switch (rand)
    {
        case 0:
        {
            client_cmd(0, "spk LTBJail/CT_Winnar_1");
        }
        case 1:
        {
            client_cmd(0, "spk LTBJail/CT_Winnar_3");
        }
        case 2:
        {
            client_cmd(0, "spk LTBJail/CT_Winnar_4");
        }
        default:
        {
        }
    }
    return 1;
}

public plugin_precache()
{
    precache_sound("LTBJail/CT_Winnar_1.wav");
    precache_sound("LTBJail/CT_Winnar_3.wav");
    precache_sound("LTBJail/CT_Winnar_4.wav");
    precache_sound("LTBJail/T_Winnar_1.wav");
    precache_sound("LTBJail/T_Winnar_2.wav");
    precache_sound("LTBJail/T_Winnar_1.wav");
    return 0;
}
but it does not want compilet?

thank you
MrGarfield is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-19-2020 , 13:31   Re: roundsound error
Reply With Quote #2

this
PHP Code:
register_plugin(0"1.0""PaintLancer"); 
Plugin name shouldn't be an integer, but a string.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
MrGarfield
Senior Member
Join Date: Feb 2013
Old 01-19-2020 , 16:42   Re: roundsound error
Reply With Quote #3

roundsound.sma(5) : error 035: argument type mismatch (argument 1)

1 Error.
Could not locate output file roundsound.amx (compile failed)

DOES NOT WORK
MrGarfield is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-19-2020 , 18:20   Re: roundsound error
Reply With Quote #4

You clearly didn't change anything. Use the requests section if you have no clue what's happening.
__________________

Last edited by OciXCrom; 01-19-2020 at 18:20.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
MrGarfield
Senior Member
Join Date: Feb 2013
Old 01-20-2020 , 10:36   Re: roundsound error
Reply With Quote #5

I'm sorry we with a friend we don't know much about the plugin, I would like to know where to post for the modification?
MrGarfield is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-20-2020 , 11:17   Re: roundsound error
Reply With Quote #6

Just change this line
register_plugin(0, "1.0", "PaintLancer")

To this
register_plugin("Sounds", "1.0", "PaintLancer")

Next time post in suggestions/requests
__________________

Last edited by Napoleon_be; 01-20-2020 at 11:18.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
MrGarfield
Senior Member
Join Date: Feb 2013
Old 01-20-2020 , 11:46   Re: roundsound error
Reply With Quote #7

great thanks a lot
MrGarfield is offline
thEsp
BANNED
Join Date: Aug 2017
Old 01-20-2020 , 13:57   Re: roundsound error
Reply With Quote #8

Quote:
Originally Posted by Napoleon_be View Post
Plugin name shouldn't be an integer, but a string.
Fun (off-topic) fact: Pawn is a type-less scripting language and for this matter, a string is a character array, not a true string (as in C++) per see. So, integers and chars are virtually the same.
Code:
register_plugin(0, 0, 0); // error! register_plugin("...", "...", "..."); // success! register_plugin({0}, {0}, {0}); // success!
And yes, as Hamlet said chars are encoded as integers. "ABC" would translate to {65, 66, 67, 0} whereas 0 (ASCII - '\0') is EOS (end of string). This of course may consume less power or at least time, hence Pawn is lightweight.
https://ostermiller.org/calc/ascii.html

Last edited by thEsp; 01-21-2020 at 12:46.
thEsp is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-20-2020 , 15:12   Re: roundsound error
Reply With Quote #9

Quote:
Originally Posted by MrGarfield View Post
I'm sorry we with a friend we don't know much about the plugin, I would like to know where to post for the modification?
Quote:
Originally Posted by OciXCrom View Post
You clearly didn't change anything. Use the requests section if you have no clue what's happening.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-21-2020 , 07:07   Re: roundsound error
Reply With Quote #10

Quote:
Originally Posted by thEsp View Post
Fun (off-topic) fact: Pawn is a type-less scripting language and for this matter, a string is a character array, not a true string (as in C++) per see. So, integers and chars are virtually the same.
Code:
register_plugin(0, 0, 0); // error! register_plugin("...", "...", "..."); // success! register_plugin({0}, {0}, {0}); // success!
I wasn't aware of that, thanks
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
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 11:00.


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