How to fix these errors
#1

Hi i have an script and i got these errors
PHP код:
C:\Users\oc\Desktop\Limitless Gaming by Syntax\gamemodes\CG-RP1.pwn(8585) : error 079inconsistent return types (array & non-array)
C:\Users\oc\Desktop\Limitless Gaming by Syntax\gamemodes\CG-RP1.pwn(8595) : error 079inconsistent return types (array & non-array)
C:\Users\oc\Desktop\Limitless Gaming by Syntax\gamemodes\CG-RP1.pwn(8597) : error 079inconsistent return types (array & non-array)
C:\Users\oc\Desktop\Limitless Gaming by Syntax\gamemodes\CG-RP1.pwn(8630) : error 079inconsistent return types (array & non-array)
C:\Users\oc\Desktop\Limitless Gaming by Syntax\gamemodes\CG-RP1.pwn(8662) : error 079inconsistent return types (array & non-array)
C:\Users\oc\Desktop\Limitless Gaming by Syntax\gamemodes\CG-RP1.pwn(8664) : error 079inconsistent return types (array & non-array)
C:\Users\oc\Desktop\Limitless Gaming by Syntax\gamemodes\CG-RP1.pwn(8669) : error 079inconsistent return types (array & non-array)
C:\Users\oc\Desktop\Limitless Gaming by Syntax\gamemodes\CG-RP1.pwn(8901) : error 079inconsistent return types (array & non-array) 
And i have this pastebin.
Код:
	if(dialogid == DIALOG_OOCSHOP)
	{
	    if(response)
	    {
	    if(listitem == 0)
	    {
			if(PlayerInfo[playerid][pGoldBars] >= 5)
			{
				SendClientMessage(playerid , COLOR_WHITE,"You have bought a Respect Points Boost - It will last for 1 Hour");
				PlayerInfo[playerid][pRPBoost] = 1;
				PlayerInfo[playerid][pGoldBars] = PlayerInfo[playerid][pGoldBars] -5;
			}
			else
			{
			SendClientMessage(playerid,COLOR_GREY,"ERROR : You don't have enough Gold-Bars ");
			}
		}
		if(listitem == 1)
		{
		    if(PlayerInfo[playerid][pGoldBars] >= 20)
			{
			    SendClientMessage(playerid,  COLOR_WHITE,"You have bought Bronze VIP Status - It will last for 1 Month");
			    PlayerInfo[playerid][pDonateRank] = 1;
			    PlayerInfo[playerid][pGoldBars] = PlayerInfo[playerid][pGoldBars] -20;
			}
			else
			{
			SendClientMessage(playerid,COLOR_GREY,"ERROR : You don't have enough Gold-Bars ");
			}
		}
		if(listitem == 2)
		{
			if(PlayerInfo[playerid][pGoldBars] >= 40)
			{
			    SendClientMessage(playerid, COLOR_WHITE,"You have bought Silver VIP Status - It will last for 1 Month");
			    PlayerInfo[playerid][pDonateRank] = 2;
			    PlayerInfo[playerid][pGoldBars] = PlayerInfo[playerid][pGoldBars] -40;
			}
			else
   			{
			SendClientMessage(playerid,COLOR_GREY,"ERROR : You don't have enough Gold-Bars ");
			}
		}
		if(listitem == 3)
		{
		    if(PlayerInfo[playerid][pGoldBars]  >= 70)
			{
				SendClientMessage(playerid , COLOR_WHITE,"You have bought Gold VIP Status - It will last for 1 Month ");
				PlayerInfo[playerid][pDonateRank] = 3;
				PlayerInfo[playerid][pGoldBars] = PlayerInfo[playerid][pGoldBars] -70;
			}
			else
			{
			SendClientMessage(playerid,COLOR_GREY,"ERROR : You don't have enough Gold-Bars ");
			}
		}
		if(listitem == 4)
		{
		    if(PlayerInfo[playerid][pGoldBars] >= 100)
		    {
		        SendClientMessage(playerid, COLOR_WHITE,"You have bought Platinium VIP Status - It will last for 1 Month");
		        PlayerInfo[playerid][pDonateRank] = 4;
				PlayerInfo[playerid][pGoldBars] = PlayerInfo[playerid][pGoldBars] -100;
			}
			else
			{
			SendClientMessage(playerid,COLOR_GREY,"ERROR : You don't have enough Gold-Bars ");
			}
		}
		if(listitem == 5)
		{
		    if(PlayerInfo[playerid][pGoldBars]  >= 25)
			{
				SendClientMessage(playerid , COLOR_WHITE,"You have bought a Custom House Ticket - Request it from any Admin using /report");
				PlayerInfo[playerid][pHouseTicket] = 1;
				PlayerInfo[playerid][pGoldBars] = PlayerInfo[playerid][pGoldBars] -25;
			}
			else
			{
			SendClientMessage(playerid,COLOR_GREY,"ERROR : You don't have enough Gold-Bars ");
			}
		}
		if(listitem == 6)
		{
		    if(PlayerInfo[playerid][pGoldBars]  >= 50)
			{
				SendClientMessage(playerid , COLOR_WHITE,"You have bought a Custom Business Ticket - Request it from any Admin using /report");
				PlayerInfo[playerid][pBusinessTicket] = 1;
				PlayerInfo[playerid][pGoldBars] = PlayerInfo[playerid][pGoldBars] -50;
			}
			else
			{
			SendClientMessage(playerid,COLOR_GREY,"ERROR : You don't have enough Gold-Bars ");
			}
		}
		if(listitem == 7)
		{
		    if(PlayerInfo[playerid][pGoldBars]  >= 25)
			{
				SendClientMessage(playerid , COLOR_WHITE,"You have bought a Custom Vehicle Ticket - Request it from any Admin using /report");
				PlayerInfo[playerid][pVehicleTicket] = 1;
				PlayerInfo[playerid][pGoldBars] = PlayerInfo[playerid][pGoldBars] -25;
			}
			else
			{
			SendClientMessage(playerid,COLOR_GREY,"ERROR : You don't have enough Gold-Bars ");
			}
		}
	}
	return 1;
}
Reply
#2

check here
click me
Reply
#3

Thanks i try that out
Reply
#4

It already has an Stock look

PHP код:
stock LoadOOCshop()
{
    new 
FileName[128], string[256];
    for(new 
0MAX_OOCSHOPi++)
    {
        
format(FileNamesizeof(FileName), "OOCshops/OOCshop_%d.ini"i);
        if(
dini_Exists(FileName))
        {
            
OOCshopInfo[i][OOCshopObjectID] = dini_Int(FileName"ObjectID" );
            
OOCshopInfo[i][OOCshopAngle] = dini_Float(FileName"Angle" );
            
OOCshopInfo[i][OOCshopX] = dini_Float(FileName"X" );
            
OOCshopInfo[i][OOCshopY] = dini_Float(FileName"Y" );
            
OOCshopInfo[i][OOCshopZ] = dini_Float(FileName"Z" );
            
OOCshopInfo[i][OOCshopObjectID] = CreateDynamicObject(2754OOCshopInfo[i][OOCshopX], OOCshopInfo[i][OOCshopY], OOCshopInfo[i][OOCshopZ]-0.100OOCshopInfo[i][OOCshopAngle],0,0,-1,250);
            
printf"[system] OOC Shop %d spawned."i);
            
SpawnedOOCshop++;
            
format(stringsizeof(string), "{01FCFF}[OOC Shop]{F0CC00}\nYou can Purchase OOC Items here\nOOC Shop ID: %d\n[/oocshop]"i);
            
OOCshop[i] = CreateDynamic3DTextLabel(stringCOLOR_DCHATOOCshopInfo[i][OOCshopX], OOCshopInfo[i][OOCshopY], OOCshopInfo[i][OOCshopZ]+0.75,10.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0,0,-1,-1100.0);
        }
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)