Raised This Month: $203 Target: $400
 50% 

Solved I get a compiling error.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nikizaniki2
Junior Member
Join Date: Dec 2017
Old 12-05-2017 , 12:46   I get a compiling error.
Reply With Quote #1

Error creating the process:
The parameter is incorrect

Used Command-Line:
"C:\Users\nikiz\Desktop\wait command.sp" -o"C:\Users\nikiz\Desktop\wait command.smx"

I get that every time i try to compile any code. The code im trying to compile:

/* Plugin Template generated by Pawn Studio */

#include <sourcemod>

public Plugin:myinfo =
{
name = "5v5comp",
author = "Nik",
description = "5v5 Competitive",
version = "1.0",
url = "http://steamcommunity.com/id/nikizaniki2/"
}

public void OnPluginStart()
{
RegAdminCmd("admin_wait", Command_Wait,, "Puts Server In Que Mode.");
}

public Action Command_Wait(int client, int args)
{
if (args < 1)
{
PrintToConsole(client, "Usage: admin_wait");
return Plugin_Handled;
}
ServerCommand("exec wait.cfg");
for(int i=0;i<=10;i++){
ServerCommand("say "Waiting For Players!"");

}

return Plugin_Handled;
}

Last edited by nikizaniki2; 12-05-2017 at 13:38.
nikizaniki2 is offline
scorpius2k1
Senior Member
Join Date: Feb 2016
Old 12-05-2017 , 12:55   Re: I get a compiling error.
Reply With Quote #2

I'm not sure what you are trying to do, but cleaning up your existing code and fixing your RegAdminCmd to use an generic admin flag, the following will compile:

PHP Code:
/* Plugin Template generated by Pawn Studio */

#include <sourcemod>

public Plugin:myinfo 
{
    
name "5v5comp",
    
author "Nik",
    
description "5v5 Competitive",
    
version "1.0",
    
url "http://steamcommunity.com/id/nikizaniki2/"
}

public 
void OnPluginStart()
{
    
RegAdminCmd("admin_wait"Command_WaitADMFLAG_GENERIC"Puts Server In Que Mode.");
}

public 
Action Command_Wait(int clientint args)
{
    if (
args 1)
    {
        
PrintToConsole(client"Usage: admin_wait");
        return 
Plugin_Handled;
    }
    
    
ServerCommand("exec wait.cfg");
    for(
int i=0;i<=10;i++){ }
    
ServerCommand("say Waiting For Players!");

    return 
Plugin_Handled;

__________________
{__ PIRATES COVE __} ● HIGH-KILL Community | Stats ●
Half-Life 2: Deathmatch
66.151.244.149:27016 => CONNECT

Last edited by scorpius2k1; 12-05-2017 at 12:56.
scorpius2k1 is offline
nikizaniki2
Junior Member
Join Date: Dec 2017
Old 12-05-2017 , 12:59   Re: I get a compiling error.
Reply With Quote #3

Quote:
Originally Posted by scorpius2k1 View Post
I'm not sure what you are trying to do, but cleaning up your existing code and fixing your RegAdminCmd to use an generic admin flag, the following will compile:

PHP Code:
/* Plugin Template generated by Pawn Studio */

#include <sourcemod>

public Plugin:myinfo 
{
    
name "5v5comp",
    
author "Nik",
    
description "5v5 Competitive",
    
version "1.0",
    
url "http://steamcommunity.com/id/nikizaniki2/"
}

public 
void OnPluginStart()
{
    
RegAdminCmd("admin_wait"Command_WaitADMFLAG_GENERIC"Puts Server In Que Mode.");
}

public 
Action Command_Wait(int clientint args)
{
    if (
args 1)
    {
        
PrintToConsole(client"Usage: admin_wait");
        return 
Plugin_Handled;
    }
    
    
ServerCommand("exec wait.cfg");
    for(
int i=0;i<=10;i++){ }
    
ServerCommand("say Waiting For Players!");

    return 
Plugin_Handled;

Thanks for helping me (first code ever, i only know some basic c/c++ still in school)
but the programs gives me the same error every time
nikizaniki2 is offline
scorpius2k1
Senior Member
Join Date: Feb 2016
Old 12-05-2017 , 13:11   Re: I get a compiling error.
Reply With Quote #4

Quote:
Originally Posted by nikizaniki2 View Post
Thanks for helping me (first code ever, i only know some basic c/c++ still in school)
but the programs gives me the same error every time
Since your code is fixed, it sounds like the error at this point is your actual command. Do you have the actual SourceMod Compiler? If not, just download SourceMod, and extract it where you want. The "spcomp" compiler is in the "scripting" folder.
SourceMod Download: https://www.sourcemod.net/downloads.php


To do a simple compile, assuming your "spcomp.exe" file is in the same directory as your source file (.sp), the following will do:

Code:
spcomp myplugin.sp
https://wiki.alliedmods.net/Compiling_SourceMod_Plugins

If your SourceMod compiler is in a different folder, I believe this will work (untested)
Code:
spcomp -i/path/to/your/source/file.sp -o/path/to/save/compiled/file.smx
You can also use the online compiler:
https://www.sourcemod.net/compiler.php

There is another good online compiler as well here, you can also use addition include files if needed:
https://spider.limetech.io


Hope that helps!
__________________
{__ PIRATES COVE __} ● HIGH-KILL Community | Stats ●
Half-Life 2: Deathmatch
66.151.244.149:27016 => CONNECT
scorpius2k1 is offline
nikizaniki2
Junior Member
Join Date: Dec 2017
Old 12-05-2017 , 13:21   Re: I get a compiling error.
Reply With Quote #5

Quote:
Originally Posted by scorpius2k1 View Post
Since your code is fixed, it sounds like the error at this point is your actual command. Do you have the actual SourceMod Compiler? If not, just download SourceMod, and extract it where you want. The "spcomp" compiler is in the "scripting" folder.
SourceMod Download: https://www.sourcemod.net/downloads.php

Hope that helps!
Im currently using Pawn Studio

Last edited by nikizaniki2; 12-05-2017 at 13:24.
nikizaniki2 is offline
nikizaniki2
Junior Member
Join Date: Dec 2017
Old 12-05-2017 , 13:30   Re: I get a compiling error.
Reply With Quote #6

Edit:The Problem Seems To Be The Compiler, I Used pwcompiler.exe It Worked Thank You!
nikizaniki2 is offline
xerox8521
Senior Member
Join Date: Sep 2011
Old 12-06-2017 , 05:16   Re: I get a compiling error.
Reply With Quote #7

You should use PrintToChatAll or use PrintToServer (if you want to send a server console message) instead of running a ServerCommand 10 times.

Last edited by xerox8521; 12-06-2017 at 05:17.
xerox8521 is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 12-06-2017 , 09:17   Re: I get a compiling error.
Reply With Quote #8

Another thing to note, to have double quotes in a string, you need to escape the quote ('\"')
__________________
WildCard65 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 09:53.


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