How to fix these errors - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to fix these errors (
/showthread.php?tid=582248)
How to fix these errors -
kelvinis - 19.07.2015
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 079: inconsistent return types (array & non-array)
C:\Users\oc\Desktop\Limitless Gaming by Syntax\gamemodes\CG-RP1.pwn(8595) : error 079: inconsistent return types (array & non-array)
C:\Users\oc\Desktop\Limitless Gaming by Syntax\gamemodes\CG-RP1.pwn(8597) : error 079: inconsistent return types (array & non-array)
C:\Users\oc\Desktop\Limitless Gaming by Syntax\gamemodes\CG-RP1.pwn(8630) : error 079: inconsistent return types (array & non-array)
C:\Users\oc\Desktop\Limitless Gaming by Syntax\gamemodes\CG-RP1.pwn(8662) : error 079: inconsistent return types (array & non-array)
C:\Users\oc\Desktop\Limitless Gaming by Syntax\gamemodes\CG-RP1.pwn(8664) : error 079: inconsistent return types (array & non-array)
C:\Users\oc\Desktop\Limitless Gaming by Syntax\gamemodes\CG-RP1.pwn(8669) : error 079: inconsistent return types (array & non-array)
C:\Users\oc\Desktop\Limitless Gaming by Syntax\gamemodes\CG-RP1.pwn(8901) : error 079: inconsistent 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;
}
Re: How to fix these errors -
Toxik - 19.07.2015
check here
click me
Re: How to fix these errors -
kelvinis - 19.07.2015
Thanks i try that out
Re: How to fix these errors -
kelvinis - 19.07.2015
It already has an Stock look
PHP код:
stock LoadOOCshop()
{
new FileName[128], string[256];
for(new i = 0; i < MAX_OOCSHOP; i++)
{
format(FileName, sizeof(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(2754, OOCshopInfo[i][OOCshopX], OOCshopInfo[i][OOCshopY], OOCshopInfo[i][OOCshopZ]-0.1, 0, 0, OOCshopInfo[i][OOCshopAngle],0,0,-1,250);
printf( "[system] OOC Shop %d spawned.", i);
SpawnedOOCshop++;
format(string, sizeof(string), "{01FCFF}[OOC Shop]{F0CC00}\nYou can Purchase OOC Items here\nOOC Shop ID: %d\n[/oocshop]", i);
OOCshop[i] = CreateDynamic3DTextLabel(string, COLOR_DCHAT, OOCshopInfo[i][OOCshopX], OOCshopInfo[i][OOCshopY], OOCshopInfo[i][OOCshopZ]+0.75,10.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0,0,-1,-1, 100.0);
}
}
return 1;
}