You are not logged in.

  • "xXNightHawk09Xx" started this thread

Posts: 6

Location: Schleswig-Holstein

wcf.user.option.userOption53: Nein

  • Send private message

1

Sunday, April 14th 2013, 1:37pm

PrintToChat problem

Moin Leute
Ich habe vor einigen Tagen angefangen mit der Sourcepawn Programmierung.
Leider bin ich jetzt schon am verzweifeln und weiß nicht weiter hoffentlich könnt ihr mir bei diesem kleinem Problem helfen:

Ich bekomme die Fehler wie folgt nur in meiner Server Console!

Spoiler Spoiler



L 04/14/2013 - 12:09:41: [SM] Displaying call stack trace for plugin "ctfreeze.smx":
L 04/14/2013 - 12:09:41: [SM] [0] Line 47,...

L 04/14/2013 - 12:09:41: [SM] Plugin encountered error 4: Invalid parameter or parameter type
L 04/14/2013 - 12:09:41: [SM] Native "PrintToChat" reported: String formatted incorrectly - parameter 3 (total 2)
L 04/14/2013 - 12:09:41: [SM] Displaying call stack trace for plugin "ctfreeze.smx":
L 04/14/2013 - 12:09:41: [SM] [0] Line 47,..


Hier der Code:

Spoiler Spoiler

include <sourcemod>
#include <sdktools>
#include <cstrike>
#include <sdkhooks>
#include <clientprefs>

#pragma semicolon 1

public Plugin:myinfo =
{
name = "New Plugin",
author = "xXNightHawk09Xx",
description = "<- Description ->",
version = "0.1",
url = "<- URL ->"
}

new Handle:g_CvarMainPluginSwitch;
new Handle:g_CvarCtFreeze;


public OnPluginStart()
{
/* ----------- Convars ------------- */
g_CvarMainPluginSwitch = CreateConVar("plugin_enable","1");
g_CvarCtFreeze = CreateConVar("sm_ctfreeze_enable","1");
/* ----------- Events ------------- */
HookEvent("player_spawn", OnPlayerSpawn);

if(GetConVarInt(g_CvarMainPluginSwitch))
{
PrintToServer("----> Plugin Ctfreeze has been successfully loaded");
}
}

public Action:OnPlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
new team = GetClientTeam(client);


if(GetConVarInt(g_CvarCtFreeze))
{
if(team <= 2)
{
PrintToChat(client,"/x4 You are freezed for 30 seconds!");
}
}

}

Impact

Super Moderator

Posts: 1,276

wcf.user.option.userOption53: Nein

  • Send private message

2

Sunday, April 14th 2013, 4:05pm

Der gepostete Code kann diesen Fehler unmöglich ausgelöst haben.

MfG
Impact

  • "xXNightHawk09Xx" started this thread

Posts: 6

Location: Schleswig-Holstein

wcf.user.option.userOption53: Nein

  • Send private message

3

Sunday, April 14th 2013, 4:26pm

Leider schon kann wenn Bilder davon posten ;D

Edit: Habe es nun hinbekommen der compiler hatte anscheinend einen weg. Habe Sourcemod neu extrahiert und den compiler dann ersetzt funktioniert nun alles.

trotzdem Danke für Antwort :D

This post has been edited 1 times, last edit by "xXNightHawk09Xx" (Apr 14th 2013, 4:37pm)


Similar threads