Jump to content
  • 0

Problema /v


Bogdan's

Question

Problema intalnita (descriere): Salutare,deci am facut comanda /v(de la 0) dar nu  imi dau seama ce functii trebuie sa folosesc pentru a denumi masina.
Ero(area / rile) / warning-(ul / urile):

D:\Vlad\Server\gamemodes\Quit.pwn(34362) : warning 202: number of arguments does not match definition
D:\Vlad\Server\gamemodes\Quit.pwn(34366) : warning 202: number of arguments does not match definition
D:\Vlad\Server\gamemodes\Quit.pwn(34370) : warning 202: number of arguments does not match definition
Liniile de cod / sursa / script-ul(obligatoriu):

if(strcmp(cmd, "/veh", true) == 0)
	{;
		new BigString15[1900];
  		if(PlayerInfo[playerid][pPcarkey] > 1)
	   {
	   strcat(BigString15, "{FFFFFF}1. %s\n", 1900, PlayerInfo[playerid][pPcarkey]);//error 1
	   }
	   if(PlayerInfo[playerid][pPcarkey2] > 1)
	   {
	   strcat(BigString15, "{FFFFFF}2. %s\n", 1900, PlayerInfo[playerid][pPcarkey2]);//error 2
	   }
	   if(PlayerInfo[playerid][pPcarkey3] > 1)
	   {
	   strcat(BigString15, "{FFFFFF}3. %s\n", 1900, PlayerInfo[playerid][pPcarkey3] );//error 3
	   }
	   ShowPlayerDialog(playerid, DIALOG_V, DIALOG_STYLE_LIST, "Vehicle Control", BigString15, "Ok","");
    return 1;
}


Imagini / Video (optional):
Ati incercat sa rezolvati singur?:  Da am incercat sa schimb cu

CarInfo[carkey][cDescription]

CarInfo[carkey2][cDescription]

CarInfo[carkey3][cDescription]

Dar nu mi-a iesit tot aceleasi warninguri imi dau.Ma puteti ajuta?

Mentionez ca gamemode-ul este Quit GF v 0.0.0.8

Edited by Bogdan's
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Da,stocheaza comanda urmatoare totul:

new vehid;
	vehid = GetPlayerVehicleID(playerid);
	if (strcmp(cmd, "/mycars", true) == 0)
	{
 		if(IsPlayerConnected(playerid))
	    {
            new carkey = PlayerInfo[playerid][pPcarkey];
		    new carkey2 = PlayerInfo[playerid][pPcarkey2];
		    new carkey3 = PlayerInfo[playerid][pPcarkey3];
            if (PlayerInfo[playerid][pPcarkey] != -1)
		    {
		        format(string, sizeof(string), "1| VehModel:[%s] VehValue:[%d] VehColor1:[%d] VehColor2:[%d] VehLocked:[%d]", CarInfo[carkey][cDescription], CarInfo[carkey][cValue], CarInfo[carkey][cColorOne], CarInfo[carkey][cColorTwo], CarInfo[carkey][cLock]);
		        SendClientMessage(playerid, COLOR_GRAD5,string);
		    }
		    if (PlayerInfo[playerid][pPcarkey2] != -1)
		    {
		        format(string, sizeof(string), "2| VehModel:[%s] VehValue:[%d] VehColor1:[%d] VehColor2:[%d] VehLocked:[%d]", CarInfo[carkey2][cDescription], CarInfo[carkey2][cValue], CarInfo[carkey2][cColorOne], CarInfo[carkey2][cColorTwo], CarInfo[carkey2][cLock]);
		        SendClientMessage(playerid, COLOR_GRAD5,string);
		    }
	    	if (PlayerInfo[playerid][pPcarkey3] != -1)
	    	{
		        format(string, sizeof(string), "3| VehModel:[%s] VehValue:[%d] VehColor1:[%d] VehColor2:[%d] VehLocked:[%d]", CarInfo[carkey3][cDescription], CarInfo[carkey3][cValue], CarInfo[carkey3][cColorOne], CarInfo[carkey3][cColorTwo], CarInfo[carkey3][cLock]);
		        SendClientMessage(playerid, COLOR_GRAD5,string);
	    	}
		}
		return 1;
	}

 

Multumesc frumos de ajutor!Am rezolvat.

Comanda corecta:

if(strcmp(cmd, "/veh", true) == 0)
    {
        new carkey = PlayerInfo[playerid][pPcarkey];
    	new carkey2 = PlayerInfo[playerid][pPcarkey2];
	    new carkey3 = PlayerInfo[playerid][pPcarkey3];
        new BigString15[1900];
        if(PlayerInfo[playerid][pPcarkey] > 1)
        {
        format(string, sizeof(string), "{FFFFFF}1. %s\n", CarInfo[carkey][cDescription]);
        strcat(BigString15, string);
        }
        if(PlayerInfo[playerid][pPcarkey2] > 1)
        {
        format(string, sizeof(string), "{FFFFFF}2. %s\n", CarInfo[carkey2][cDescription]);
        strcat(BigString15, string);
        }
        if(PlayerInfo[playerid][pPcarkey3] > 1)
        {
        format(string, sizeof(string), "{FFFFFF}3. %s\n", CarInfo[carkey3][cDescription]);
        strcat(BigString15, string);
        }
        ShowPlayerDialog(playerid, DIALOG_V, DIALOG_STYLE_LIST, "Vehicle Control", BigString15, "Ok","");
    return 1;
}

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.