AdminMod.de
https://www.adminmod.de/

Compilierunsg fehler benötige Hilfe !!!
https://www.adminmod.de/viewtopic.php?t=4375
Seite 1 von 1

Autor:  aRved [ 11.11.2002, 21:30 ]
Betreff des Beitrags:  Compilierunsg fehler benötige Hilfe !!!

Ja ich hab mir mal die neue am Version gezogen und alle meine Plugins neu compiliert, jez hab ic haber bei 2 Fehler bekommen...

Und wollte daher mal fragen ob mir dabei wör helfen könnte...

Plugin 1 :
Code:
//   -Plugin_sank_shutdown. Stolen, coerced, silver-tongue-outta'd by Kleen13.     //
//    Thanks to Sank for wisdom, Shady Milkman for insight, and Halogen for        //
//    posting absolute rubbish at regular intervals....                            //
//   -This updated version also includes shutdown audio 6 seconds from server      //
//    termination.  Thanks to Kndroc for the Playsound function                    //                                                  
//                                                                                 //
//   -This script provides a "nice" server shutdown message (30 secs) before       //
//    exiting  HLDS.  By default, the only people authorized to use this script    //
//    are "rcon access" admins.                                                    //
//                                                                                 //
//                                                                                 //
/////////////////////////////////////////////////////////////////////////////////////


#include <core>
#include <console>
#include <string>
#include <admin>
#include <adminlib>

#define ACCESS_SHUTDOWN 65535

new STRING_VERSION[MAX_DATA_LENGTH] = "2.50.e";

public plugin_init()
{
	plugin_registerinfo("Sank Shutdown Plugin", "Enables soft remote shutting down of a server", STRING_VERSION);

	plugin_registercmd("admin_shutdown", "admin_shutdown", ACCESS_SHUTDOWN, "admin_shutdown: Starts the shutdown timer.");

	return PLUGIN_CONTINUE;
}

playShutdownSound() {
  new i;
  new iMaxPlayers = maxplayercount();
  new Name[MAX_NAME_LENGTH];
  new UserID;
  new WONID;

  if (getvar("admin_fx") != 0) {
    for (i = 1; i <= iMaxPlayers; i++) {
  		if (playerinfo(i,Name,MAX_NAME_LENGTH,UserID,WONID) != 0) {
        playsound(Name, "scientist/c1a0_sci_dis15a.wav");
      }
    }
  }
}


public admin_shutdown(HLData, HLCommand, HLUser, UserIndex)
{
	set_timer("kleen_shutdown", 1, 31);
	plugin_exec("admin_say", "Sorry Server wird restartet, plz come back");
	return PLUGIN_HANDLED;
}

public kleen_shutdown(Timer, Repeat, HLUser, HLParam)
{
	new Text[MAX_TEXT_LENGTH];

	snprintf(Text, MAX_TEXT_LENGTH, "Server wird neugestartet in^n %d", Repeat-1);
	plugin_exec("admin_csay", Text);

	//6 seconds left to give time for the sound to be played completely
	//change 4 to a different number of seconds if desired becuse of a longer/shorter sound
	if( Repeat-1 == 6 )
	{
	   //play the shutting down sound
	   playShutdownSound()
	   //for now log a message that its happening for debugging purposes
	   log( "Clients Told to Play Shutdown Sound" );
	}

	if (Repeat-1 == 0)
	{
		kill_timer(Timer);
		plugin_exec("admin_say", "Have a Nice Day!");
        	exec("exit");
	}


	return PLUGIN_HANDLED;
}
Fehler dazu :
Code:
plugin_sank_shutdown2.sma(72) Error [1]: expected token: ";", but found "-identifier-"
Plugin 2 :
Code:
// Connect, disconnect, respawn detection. To use with StatsMe MetaMod plugin. 
// http://www.olo.counter-strike.pl 
// http://forums.unitedadmins.com/forumdisplay.php?s=&forumid=36 

#include <core> 
#include <console> 
#include <string> 
#include <admin> 
#include <adminlib> 

#define ACCESS_CONSOLE 131072 
new STRING_VERSION[MAX_DATA_LENGTH] = "2.1.9"; 
new SoundConnect[MAX_TEXT_LENGTH]="sound/misc/gong.wav" 
new SoundDisconnect[MAX_TEXT_LENGTH]="sound/misc/comeagain.wav" 

// connected and disconnected 
public sm_cdr_evn(HLCommand,HLData) { 
   new mymsg[MAX_DATA_LENGTH]; 
   convert_string(HLData,mymsg,MAX_DATA_LENGTH); 
   new src[4], Type[4], Msg[MAX_DATA_LENGTH], Name[MAX_DATA_LENGTH]; 
   strgsplit(mymsg, " ","^"", src, 4, Type, 4, Msg, MAX_DATA_LENGTH,Name, MAX_DATA_LENGTH); 
   if (Msg[6]=='c'){ 
      snprintf(mymsg,200,"%s hat den Server betreten.^nSelam Aleikum in der Doenerbude!",Name); soundall(SoundConnect);  // - * Player_name connected 
   } 
   else { 
      snprintf(mymsg,200,"%s hat den Server verlassen.^nUnd fuer die andern gehts jetzt weiter!",Name); soundall(SoundDisconnect);  // - * Player_name disconnected 
   } 
   typesay(mymsg, 6, 0, 100, 200); 
   return PLUGIN_CONTINUE; 
} 

public plugin_init() { 
   plugin_registerinfo("Connect, Disconnect, Respawn","Detects some events.",STRING_VERSION); 
   plugin_registercmd("sm_cdr_evn","sm_cdr_evn",ACCESS_CONSOLE,""); 
   plugin_registercmd("sm_cdrstr_evn","sm_cdrstr_evn",ACCESS_CONSOLE,""); 
   exec("sm_register TextMsg ^"admin_command sm_cdr_evn^" ac ^"2=#Game_c^" ^"2=#Game_d^""); 
   exec("sm_register ResetHUD ^"admin_command sm_cdrstr_evn^" bd"); 
   return PLUGIN_CONTINUE; 
} 
soundall(Sound[]){ 
    
   new Name[MAX_NAME_LENGTH]; 
   new maxplayers = maxplayercount(); 
   new iWONID; 
   new i; 
   new dummy1; 
    
   for(i = 1; i <= maxplayers; i++ ) 
   { 
      if( playerinfo(i, Name, MAX_NAME_LENGTH,dummy1,iWONID,dummy1,dummy1) ){ 
         playsound(Name,Sound); 
      } 
   } 
   return PLUGIN_HANDLED; 
} 
Fehler dazu :
Code:
plugin_sm_cdr.sma(14) Error [1]: expected token: ";", but found "new"
plugin_sm_cdr.sma(17) Error [1]: expected token: ";", but found "public"
Würde mich freuen wenn mir da wer weiterhelfen könnte...

Thx im voraus...

Autor:  Rinde [ 11.11.2002, 21:33 ]
Betreff des Beitrags: 

am ende von zeile 71 bzw. 13 und 16 ein ; hinzufügen?!

Autor:  aRved [ 11.11.2002, 21:37 ]
Betreff des Beitrags: 

da ist doch schon nen ;

das zeile 72 :

log( "Clients Told to Play Shutdown Sound" );

Autor:  Rinde [ 11.11.2002, 22:06 ]
Betreff des Beitrags: 

aber hinter play_ShutdownSound() nicht

Autor:  aRved [ 11.11.2002, 22:11 ]
Betreff des Beitrags: 

hah jez hab ich verstanden wie du das meintest...

Hab se jez alle wegbekommen...

Dank dir jez kann ich morgen auf die neue version updaten und dann kann ich mal gucken ob da dein Nominate Plugin funzt....

Big THX

Autor:  Rinde [ 11.11.2002, 22:15 ]
Betreff des Beitrags: 

wollen wir doch hoffen dass es das tut. vergiss nciht die neuste version runterzuladen, die ich neulich gepostet habe. die ist nämlich sogar ein wenig getestet, solte also nicht alzu grobe fehler enthalten

Autor:  aRved [ 11.11.2002, 22:17 ]
Betreff des Beitrags: 

die in english *grml*


Naja werd se wohl nehmen müssen bis ich lust hab sie selber zu übersetzen oder du ne deutsche version hast...

Äh eine frage hab ich noc hwo mussen die mapcycle.txt hin ???

Muss die im cstrike verzeichniss bleiben ?

Autor:  Rinde [ 11.11.2002, 22:21 ]
Betreff des Beitrags: 

was wo mapcycle? die müssen dahin wo sie immer sind. die neue version nimmt auch nciht mehr "mapcycle.txt als standard, sondern getstrvar("mapcyclefile"...)

Autor:  aRved [ 11.11.2002, 22:24 ]
Betreff des Beitrags: 

okidoki

Werd ich dann gleich mal ziehen vielleicht kommt ich ja heute abend noch zum testen...

Thx erstmal..

Seite 1 von 1 Alle Zeiten sind UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/