Error: Invalid character constant on line 35

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
Infamous2017
Membru, skill +1
Membru, skill +1
Posts: 228
Joined: 11 Feb 2017, 12:13
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 2 times
Contact:

24 Dec 2020, 11:04

Can anyone help how i can fix this ? Need it for 1.8.3 Compiler. The Problem is this nickname : "CSO^.CSBLACKDEVIL^.^CoM[4]",
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Nick Checker"
#define VERSION "1.0"
#define AUTHOR "stask0"

new const IP[] =
{
	"185.148.145.215:27015",
	"145.239.116.25",
	"178.32.241.3",
	"178.32.241.6",
	"178.32.241.4",
	"178.32.241.2",
	"213.32.98.67",
	"51.89.114.99:27015",
	"164.132.220.103 [255]",
	"87.98.168.18",
	"178.32.241.1",
	"131.221.32.247:27021",
	"178.32.241.",
	"178.32.241.",
	"231.342.452"
}

new const NAMES[][] =
{
	"G a m e r C l u b . N e T",
	"231.342.452;",
	"mTw/,.Barkar PRO .,/",
	"[PRO].DUAL-GAMING.]R[o]",
	"Cs(.)WtfCs(.)Com-Player [7]",
	"Cs(.)WtfCs(.)Com-Player [1]",
	"CSO^.CSBLACKDEVIL^.^CoM[4]",
	"Cs(.)WtfCs(.)Com-Player [2]",
	"unnamed",
	"Player",
	"player",
	"FCS.CsBlackDevil.Com [15]"
}

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
}

public checkips(id) 
{
	new name[32]
	get_user_name(id, name, 31)
	
	new args[20]
	read_args(args, 19)
	
	for ( new i = 0; i < sizeof(IP); i++ )
	{
	
		if( equali(name, IP))
		{
			server_cmd("kick #%d You are not allowed to put ip's at your nick.",get_user_userid(id)) 
			
			client_print(0, print_chat, "%s was kicked cuz he tryed to reclame an other server.", name)
			return
		}
	}

	for(new i; i < sizeof(NAMES); i++)
	{
		if(equali(name, NAMES))
		{
			set_user_info(id, "name", "37.59.43.196:27018")
			return
		}
	}
}

public client_connect(id) 
{
	checkips(id)
}

public client_infochanged(id) 
{
	checkips(id)
} 


AMX Mod X Compiler 1.8.3-dev+5154
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

Error: Invalid character constant on line 35

1 Error.
Could not locate output file D:\Amxmodx\AMX Mod X\amxxstudio\Untitled.amx (compile failed).
RoyalServer 2
The Kalu
Fost administrator
Fost administrator
Posts: 13707
Joined: 09 Oct 2010, 12:39
Detinator Steam: Da
CS Status: In grajd!
SteamID: kalulord
Reputatie: Fost Administrator
Fost membru Club eXtreamCS (6 luni)
Nume anterior: Terra
Location: Romania, Ploiesti
Has thanked: 328 times
Been thanked: 646 times
Contact:

24 Dec 2020, 11:22

Done, you had to escape character ^ with another ^,.
cs | Afiseaza codul
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Nick Checker"
#define VERSION "1.0"
#define AUTHOR "stask0"

new const IP[] =
{
	"185.148.145.215:27015",
	"145.239.116.25",
	"178.32.241.3",
	"178.32.241.6",
	"178.32.241.4",
	"178.32.241.2",
	"213.32.98.67",
	"51.89.114.99:27015",
	"164.132.220.103 [255]",
	"87.98.168.18",
	"178.32.241.1",
	"131.221.32.247:27021",
	"178.32.241.",
	"178.32.241.",
	"231.342.452"
}

new const NAMES[] =
{
	"G a m e r C l u b . N e T",
	"231.342.452;",
	"mTw/,.Barkar PRO .,/",
	"[PRO].DUAL-GAMING.]R[o]",
	"Cs(.)WtfCs(.)Com-Player [7]",
	"Cs(.)WtfCs(.)Com-Player [1]",
	"CSO^^.CSBLACKDEVIL^^.^^CoM[4]",
	"Cs(.)WtfCs(.)Com-Player [2]",
	"unnamed",
	"Player",
	"player",
	"FCS.CsBlackDevil.Com [15]"
}

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
}

public checkips(id) 
{
	new name[32]
	get_user_name(id, name, 31)
	
	new args[20]
	read_args(args, 19)
	
	for ( new i = 0; i < sizeof(IP); i++ )
	{
	
		if( equali(name, IP))
		{
			server_cmd("kick #%d You are not allowed to put ip's at your nick.",get_user_userid(id)) 
			
			client_print(0, print_chat, "%s was kicked cuz he tryed to reclame an other server.", name)
			return
		}
	}

	for(new i; i < sizeof(NAMES); i++)
	{
		if(equali(name, NAMES))
		{
			set_user_info(id, "name", "37.59.43.196:27018")
			return
		}
	}
}

public client_connect(id) 
{
	checkips(id)
}

public client_infochanged(id) 
{
	checkips(id)
} 
Image
Infamous2017
Membru, skill +1
Membru, skill +1
Posts: 228
Joined: 11 Feb 2017, 12:13
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 2 times
Contact:

24 Dec 2020, 11:27

But you renamend only the username or not ? "CSO^^.CSBLACKDEVIL^^.^^CoM[4]", When now the player CSO^.CSBLACKDEVIL^.^CoM[4] connect he didnt get renamend. Thats the Problem.. or?????????
Infamous2017
Membru, skill +1
Membru, skill +1
Posts: 228
Joined: 11 Feb 2017, 12:13
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 2 times
Contact:

26 Dec 2020, 17:08

Thread can be closed.. The Solution was:

#pragma ctrlchar '^x08'

For everyone who want use this Plugin.
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests