Errori

Započeo Martyn, Maj 09, 2020, 04:02:12 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Ubacio sam voice chat i dodao sam liniju koja salje zvukove kad neko prica koju mozete videti dole i errori i 1 warning mi izbaci, dodao sam je pod OnGameModeInit
Dio skripte: [pawn]Linija : sv_stream_player_attach(stream, playerid);
Ovo je voice chat : #include <a_samp>
#include <core>
#include <float>
#include <sampvoice>

#define sv_stream_player_attach
#define stream

#pragma tabsize 0

main() {}

new SV_GSTREAM:gstream;
new SV_LSTREAM:lstream[MAX_PLAYERS] = { SV_NULL, ... };

public SV_VOID:OnPlayerActivationKeyPress(
   SV_UINT:playerid,
   SV_UINT:keyid
) {
   if (keyid == 0x42 && lstream[playerid]) SvAttachSpeakerToStream(lstream[playerid], playerid);
   if (keyid == 0x5A && gstream) SvAttachSpeakerToStream(gstream, playerid);
}

public SV_VOID:OnPlayerActivationKeyRelease(
   SV_UINT:playerid,
   SV_UINT:keyid
) {
   if (keyid == 0x42 && lstream[playerid]) SvDetachSpeakerFromStream(lstream[playerid], playerid);
   if (keyid == 0x5A && gstream) SvDetachSpeakerFromStream(gstream, playerid);
}

public OnPlayerConnect(playerid) {

   if (!SvGetVersion(playerid)) SendClientMessage(playerid, -1, "{FF0000}VOICE: {FFFFFF}Imate stariju verziju dodatka, mozda nekompatibilnu, updateaj te je !");
   else if (!SvHasMicro(playerid)) SendClientMessage(playerid, -1, "{FF0000}VOICE: {FFFFFF}Nemate instaliran SAMP-VOICE !");
   else if (lstream[playerid] = SvCreateDLStreamAtPlayer(40.0, SV_INFINITY, playerid, 0xff0000ff, "L")) { // red color
      SendClientMessage(playerid, -1, "{FF0000}VOICE: {FFFFFF}VOICE PLUGIN USPESNO UCITAN !");
      if (gstream) SvAttachListenerToStream(gstream, playerid);
      SvAddKey(playerid, 0x42);
      SvAddKey(playerid, 0x5A);
   }

   return 1;

}

public OnPlayerDisconnect(playerid, reason) {

   if (lstream[playerid]) {
      SvDeleteStream(lstream[playerid]);
      lstream[playerid] = SV_NULL;
   }

   return 1;

}

public OnPlayerSpawn(playerid) {

   SetPlayerInterior(playerid,0);
   TogglePlayerClock(playerid,0);

   return 1;

}

public OnPlayerDeath(playerid, killerid, reason) {

      return 1;

}

SetupPlayerForClassSelection(playerid) {
   SetPlayerInterior(playerid,14);
   SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
   SetPlayerFacingAngle(playerid, 270.0);
   SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
   SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
}

public OnPlayerRequestClass(playerid, classid) {
   SetupPlayerForClassSelection(playerid);
   return 1;
}

public OnGameModeInit() {

   //SvDebug(SV_TRUE);

   gstream = SvCreateGStream(0xffff0000, "G"); // blue color
   //sv_stream_player_attach(stream, playerid);

   CreateVehicle(400, 1945.0226, 1321.6926, 9.1094, 180.2150, -1, -1, -1);
   Create3DTextLabel("TextLabel", 0x008080FF, 1945.0226, 1321.6926, 9.1094, 40.0, 0, 0);

   SetGameModeText("Bare Script");
   ShowPlayerMarkers(1);
   ShowNameTags(1);
   AllowAdminTeleport(1);

   AddPlayerClass(265,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);

   return 1;

}
[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): D:\Ideal Gaming\Fortuna RealLife\filterscripts\voicec.pwn(91) : error 029: invalid expression, assumed zero
D:\Ideal Gaming\Fortuna RealLife\filterscripts\voicec.pwn(91) : error 029: invalid expression, assumed zero
D:\Ideal Gaming\Fortuna RealLife\filterscripts\voicec.pwn(91) : warning 215: expression has no effect

Slika/video ingame problema(obavezno ako je ingame problem): //
Poslednja Izmena: Maj 09, 2020, 04:03:55 PRE PODNE od Martyn