Raised This Month: $12 Target: $400
 3% 

error name>Exception reported: Instruction contained invalid parameter


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kdaekiss
Junior Member
Join Date: Sep 2017
Old 08-31-2018 , 23:44   error name>Exception reported: Instruction contained invalid parameter
Reply With Quote #1

Hello, that's the same error name as the title. Compile works well.

The code below is hook

Code:
public Action:SayHook(Client, Arguments)
The code below does not even operate an error message during the operation.
Code:
if(StrContains(Msg[1], "!강화포인트") != -1)
		{
			if(!StrEqual(s_Buffer[1], "", false) || !StrEqual(s_Buffer[2], "", false))
			{
				new Target = GetTargetToName(s_Buffer[1]);
				new wuppoint = StringToInt(s_Buffer[2]);
				if(Target == -1)
				{
					PrintToChat(Client, "\x070FF0FF[%s]\x01이라는 닉네임이 없습니다.", s_Buffer[1]);
					return Plugin_Handled;
				}
				if(Target == 0)
				{
					PrintToChat(Client, "\x070FF0FF중복되는 사람이 있습니다.");
					return Plugin_Handled;
				}
				GetClientName(Target, s_Name, sizeof(s_Name));
				PrintToChat(Client, "\x070FF0FF[%s]\x01님에게 강화 포인트를\x03[%d]\x01포인트를 드렸습니다.", s_Name, wuppoint);
				PrintToChat(Target, "\x070FF0FF[Admin]\x01님께서 강화 포인트를\x03[%d]\x01포인트를 드렸습니다.", wuppoint);
				wup[Target] += wuppoint;
			}
			else PrintToChat(Client, "\x070FF0FF사용법 : \x03!강화포인트 <닉네임> <포인트>");
			return Plugin_Handled;
		}
	}
	return Plugin_Continue;
}
help me plz.. **The translation may be rather awkward.

This Game is CS:S

Last edited by kdaekiss; 08-31-2018 at 23:45. Reason: game name..not send
kdaekiss is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 09-01-2018 , 07:14   Re: error name>Exception reported: Instruction contained invalid parameter
Reply With Quote #2

The error means SM thinks there's something wrong with the compiled code.

You can try using the latest SM and compiler (either 1.9 or 1.10). If you already are, then you should provide the actual source code you're compiling.

If you're using an older versions of SM or the compiler (or ones you've modified), you're on your own.

Just for testing, I tried the following code with the 1.9 compiler:

PHP Code:
public void OnPluginStart() {
    
foo();
}

int GetTargetToName(char[] s) { return 1; }

public 
Action foo() {
    
int Client 1;
    
int wup[2];
    
char Msg[2][64] = { """!강화포인트" };
    
char s_Buffer[3][64] = { "a""b""3" };
    
char s_Name[64];

    if(
StrContains(Msg[1], "!강화포인트") != -1)
    {
        if(!
StrEqual(s_Buffer[1], ""false) || !StrEqual(s_Buffer[2], ""false))
        {
            new 
Target GetTargetToName(s_Buffer[1]);
            new 
wuppoint StringToInt(s_Buffer[2]);
            if(
Target == -1)
            {
                
PrintToChat(Client"\x070FF0FF[%s]\x01이라는 닉네임이 없습니다."s_Buffer[1]);
                return 
Plugin_Handled;
            }
            if(
Target == 0)
            {
                
PrintToChat(Client"\x070FF0FF중복되는 사람이 있습니다.");
                return 
Plugin_Handled;
            }
            
GetClientName(Targets_Namesizeof(s_Name));
            
PrintToServer("\x070FF0FF[%s]\x01님에게 강화 포인트를\x03[%d]\x01포인트를 드렸습니다."s_Namewuppoint);
            
//PrintToChat(Client, "\x070FF0FF[%s]\x01님에게 강화 포인트를\x03[%d]\x01포인트를 드렸습니다.", s_Name, wuppoint);
            
PrintToServer("\x070FF0FF[Admin]\x01님께서 강화 포인트를\x03[%d]\x01포인트를 드렸습니다."wuppoint);
            
//PrintToChat(Target, "\x070FF0FF[Admin]\x01님께서 강화 포인트를\x03[%d]\x01포인트를 드렸습니다.", wuppoint);
            
wup[Target] += wuppoint;
        }
        else 
PrintToServer("\x070FF0FF사용법 : \x03!강화포인트 <닉네임> <포인트>");
        
//else PrintToClient(Client, "\x070FF0FF사용법 : \x03!강화포인트 <닉네임> <포인트>");
        
return Plugin_Handled;
    }
    return 
Plugin_Continue;

It compiles and runs. I see the two expected lines printed.
Fyren is offline
kdaekiss
Junior Member
Join Date: Sep 2017
Old 09-01-2018 , 10:15   Re: error name>Exception reported: Instruction contained invalid parameter
Reply With Quote #3

The compiler works well. Please check attached file and the error name is displayed in srcds.

PrintToChat works well on other systems No problem. And is the code CS:S? Or Is it strange how I write it?code

It's a new code that doesn't fit into my eyes.

Don't get me wrong. It's not a question. I'm curious, and if there's anything wrong, I'm trying to fix it.
Attached Thumbnails
Click image for larger version

Name:	1.PNG
Views:	277
Size:	1.9 KB
ID:	171206  

Last edited by kdaekiss; 09-03-2018 at 07:13. Reason: Additional
kdaekiss 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 19:13.


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