Jump to content

[REZOLVAT] Problema gamemode GoldPlay


FanReborn
 Share

Recommended Posts

  • Username:Sahoooo
  • Problema întălnită:Problema cu gamemode-ul GoldPlay la compilare imi da eroarea asta : C:\Users\Windows 7\Desktop\server_update\pawno\include\YSI\y_master.inc(134) : fatal error 111: user error: Did you do <YSI/y_master> instead of the required <YSI\y_master>?
  • Detalii despre problemă: Este gamemode-ul Goldplay
  • Ce ai încercat să faci înainte să postezi?: Am incercat sa rezolv eu singur dar tot apareau alte errori si acum am pus din nou gm-ul
  • Cod sursă (recomandat pastebin.com) :https://pastebin.com/Mk4DTjrQ
  • Alte detalii:Tin sa precizez ca nu am schimbat nimic in gm sau in includ-uri
Edited by Sahoooo
Link to comment
Share on other sites

Acum 2 ore, Leonard a spus:

Versiunea pe care o ai de YSI e prea veche, foloseste aceasta versiune: http://www.girlshare.ro/3490148717

 

In gamemode trebuie sa ai ceva de genu:


#include <YSI\y_master>
#include <YSI\y_commands>
/// alte include-uri YSI

 

Am rezolvat ! Dar acum imi da errorile astea 

error 025: function heading differs from prototype

error 025: function heading differs from prototype

Lini: 
public OnPlayerCommandReceived(playerid, cmdtext[])
{
    if(IsPlayerLogged[playerid] == 0) {
        Kick(playerid);
        return 0;
    }
    if(TutorialActive[playerid] == 1) return 0;
    if(GetPVarInt(playerid, "PlayMine") == 1) return 0;
    if(TradeID[playerid] != -1) return 0;
    return 1;
}

public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) return SCM(playerid, COLOR_WHITE, "Aceasta comanda nu exista! Foloseste comanda /help pentru a vedea majoritatea comenzilor.");
    return 1;
}

Link to comment
Share on other sites

  • Administrator
1 hour ago, Sahoooo said:

Am rezolvat ! Dar acum imi da errorile astea 

error 025: function heading differs from prototype

error 025: function heading differs from prototype

Lini: 
public OnPlayerCommandReceived(playerid, cmdtext[])
{
    if(IsPlayerLogged[playerid] == 0) {
        Kick(playerid);
        return 0;
    }
    if(TutorialActive[playerid] == 1) return 0;
    if(GetPVarInt(playerid, "PlayMine") == 1) return 0;
    if(TradeID[playerid] != -1) return 0;
    return 1;
}

public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) return SCM(playerid, COLOR_WHITE, "Aceasta comanda nu exista! Foloseste comanda /help pentru a vedea majoritatea comenzilor.");
    return 1;
}

Primesti acele erori deoarece ultima versiune de YSI foloseste alte sintaxe pentru publicul OnPlayerCommandPerformed respectiv OnPlayerCommandReceived.

 

Lista de erori

enum e_COMMAND_ERRORS
{
	// The majority of these are even - odd numbers return "1" not "0".
	COMMAND_ZERO_RET      = 0 , // The command returned 0.
	COMMAND_OK            = 1 , // Called corectly.
	COMMAND_UNDEFINED     = 2 , // Command doesn't exist.
	COMMAND_DENIED        = 3 , // Can't use the command.
	COMMAND_HIDDEN        = 4 , // Can't use the command don't let them know it exists.
	COMMAND_NO_PLAYER     = 6 , // Used by a player who shouldn't exist.
	COMMAND_DISABLED      = 7 , // All commands are disabled for this player.
	COMMAND_BAD_PREFIX    = 8 , // Used "/" instead of "#", or something similar.
	COMMAND_INVALID_INPUT = 10, // Didn't type "/something".
}

 

Exemplu de folosire:

public e_COMMAND_ERRORS:OnPlayerCommandReceived(playerid, cmdtext[], e_COMMAND_ERRORS:success)
{
	if(success == COMMAND_UNDEFINED) // daca comanda nu exista
	{
		SendClientMessage(playerid, -1, "Aceasta comanda nu exista");
		return COMMAND_OK;
	}

	if(!playerLogat[playerid]) // daca nu este logat
	{
		SendClientMessage(playerid, -1, "Trebuie sa te loghezi pentru a avea acces la comenzi.");
		return COMMAND_OK;
	}

	if(jucatorInActiuneImportanta[playerid] == 1) // daca este intr-o actiune
	{
		sendError(playerid, "Nu poti folosi comenzi in aceasta actiune.");
		return COMMAND_OK;
	}

	return COMMAND_OK;
}

 

???? 

Link to comment
Share on other sites

1 oră în urmă, Leonard a spus:

Primesti acele erori deoarece ultima versiune de YSI foloseste alte sintaxe pentru publicul OnPlayerCommandPerformed respectiv OnPlayerCommandReceived.

 

Lista de erori


enum e_COMMAND_ERRORS
{
	// The majority of these are even - odd numbers return "1" not "0".
	COMMAND_ZERO_RET      = 0 , // The command returned 0.
	COMMAND_OK            = 1 , // Called corectly.
	COMMAND_UNDEFINED     = 2 , // Command doesn't exist.
	COMMAND_DENIED        = 3 , // Can't use the command.
	COMMAND_HIDDEN        = 4 , // Can't use the command don't let them know it exists.
	COMMAND_NO_PLAYER     = 6 , // Used by a player who shouldn't exist.
	COMMAND_DISABLED      = 7 , // All commands are disabled for this player.
	COMMAND_BAD_PREFIX    = 8 , // Used "/" instead of "#", or something similar.
	COMMAND_INVALID_INPUT = 10, // Didn't type "/something".
}

 

Exemplu de folosire:


public e_COMMAND_ERRORS:OnPlayerCommandReceived(playerid, cmdtext[], e_COMMAND_ERRORS:success)
{
	if(success == COMMAND_UNDEFINED) // daca comanda nu exista
	{
		SendClientMessage(playerid, -1, "Aceasta comanda nu exista");
		return COMMAND_OK;
	}

	if(!playerLogat[playerid]) // daca nu este logat
	{
		SendClientMessage(playerid, -1, "Trebuie sa te loghezi pentru a avea acces la comenzi.");
		return COMMAND_OK;
	}

	if(jucatorInActiuneImportanta[playerid] == 1) // daca este intr-o actiune
	{
		sendError(playerid, "Nu poti folosi comenzi in aceasta actiune.");
		return COMMAND_OK;
	}

	return COMMAND_OK;
}

 

???? 

PWP Dulce cel mai smecher scripter! +1

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...