26 errors
#1

I'm trying to compile the aHouse filterscript, however it resulted in 26 errors occuring.

PHP код:
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(21) : error 018initialization data exceeds declared size
C
:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(29) : error 010invalid function or declaration
C
:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(137) : error 017undefined symbol "dini_Exists"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(139) : error 017undefined symbol "dini_Create"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(141) : error 017undefined symbol "dini_Set"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(143) : error 017undefined symbol "dini_Set"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(145) : error 017undefined symbol "dini_IntSet"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(147) : error 017undefined symbol "dini_IntSet"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(149) : error 017undefined symbol "dini_IntSet"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(151) : error 017undefined symbol "dini_IntSet"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(153) : error 017undefined symbol "dini_IntSet"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(154) : error 017undefined symbol "dini_IntSet"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(157) : error 017undefined symbol "dini_IntSet"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(161) : error 017undefined symbol "dini_FloatSet"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(162) : error 017undefined symbol "dini_FloatSet"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(163) : error 017undefined symbol "dini_FloatSet"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(164) : error 017undefined symbol "dini_IntSet"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(165) : error 017undefined symbol "dini_IntSet"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(167) : error 017undefined symbol "dini_IntSet"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(169) : error 017undefined symbol "dini_IntSet"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(173) : error 017undefined symbol "dini_FloatSet"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(174) : error 017undefined symbol "dini_FloatSet"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(175) : error 017undefined symbol "dini_FloatSet"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(178) : error 017undefined symbol "dini_IntSet"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(179) : error 017undefined symbol "dini_IntSet"
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(193) : error 017undefined symbol "dini_Get" 
Reply
#2

get Dini and at the top of ur script write #include <dini>

link for dini: https://sampforum.blast.hk/showthread.php?tid=50
Reply
#3

Quote:
Originally Posted by XtremeR
Посмотреть сообщение
get Dini and at the top of ur script write #include <dini>

link for dini: https://sampforum.blast.hk/showthread.php?tid=50
I already had dini.inc so I added the dini code into the script and it's gotten rid of the 24 dini errors, however I'm still left with error 18 and 10.
Reply
#4

Give the left errors.
Reply
#5

Quote:
Originally Posted by Romel
Посмотреть сообщение
Give the left errors.
PHP код:
C:UsersJamieDesktopdotXen SanAndreasfilterscriptsaHouse.pwn(21) : error 018initialization data exceeds declared size 
C
:UsersJamieDesktopdotXen SanAndreasfilterscriptsaHouse.pwn(29) : error 010invalid function or declaration 
Reply
#6

Post Your Codes At Line 21 and 29
Reply
#7

Quote:
Originally Posted by ******
Посмотреть сообщение
The first one means that you are trying to put too much data in to an array. The second one could mean any number of things depending on what is on that line - basically that line is wrong.
How do I fix this problem?
Reply
#8

Quote:
Originally Posted by ******
Посмотреть сообщение
As I said, it could be any number of things, but without the line (and the surrounding lines) I can't possibly say which thing.
I hope this helps

PHP код:
#include <a_samp>
#include <dudb>
#include <Dini>
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
//----------------------------
//----------------------------
//  Full house script by Antironix!
//  Just don't remove the credits!
//----------------------------
//----------------------------
#define MAX_HOUSES 1000
#define MAX_RENTCOST 1000
#define MIN_RENTCOST 500
#define MAX_BUY_CARS 1
#define CAR_DELIVER_TIME 1 //The time that it takes that your car will be delivered. In hours.
new HOUSE_STATS 0//0 Means housestats on pickup pickup, 1 means only housestats on /housestats command.
//buyable cars
enum CarInfo {CarModel,CarName[24],CarCost};
new 
Buyable_Cars[MAX_BUY_CARS][CarInfo] =
{  
//Modelid, Buy Name, Price
    
{411,"Infernus",500000},
    {
522,"NRG-500",500000},
    {
451,"Turismo",500000},
    {
541,"Bullet",500000},
    {
415,"Cheetah",500000},
    {
429,"Banshee",500000},
    {
494,"Hotring",500000},
    {
556,"Monster",500000}
};
#define Cost_Admiral 50000
//----------------------------
//----------------------------
#define c_y 0xFFFF00AA
#define c_r 0xAA3333AA
new HousePickup[MAX_HOUSES];
new 
playerinterior[MAX_PLAYERS]=-1;
new 
inhousepickup[MAX_PLAYERS];
new 
playericonhouse[MAX_PLAYERS];
new 
Float:housexFloat:houseyFloat:housez;
new 
housemapicon[MAX_PLAYERS];
new 
playerworld[MAX_PLAYERS];
new 
bool:KillVeh[MAX_VEHICLES] = false;
forward rentfee();
forward newcar();
forward KillVehicle(carid); 
Reply
#9

Quote:
Originally Posted by ******
Посмотреть сообщение
Well MAX_BUY_CARS is 1, yet you have 8 defined. Also, you try and assign the single number "-1" to an array.

I could also go on about the TERRIBLE naming scheme you have there:

Код:
Buyable_Cars
Camel case, words underscore separated, no global marker.

Код:
HousePickup
Camel case, no separation, no global marker.

Код:
playerinterior
Lower case, no separation, no global marker.

And what function names and defines you show there have the same complete lack of consistency. How do you expect to EVER be able to read any of your code if any given symbol could mean anything at all?
Ok, I changed the car limit and it now comes up with this error:

PHP код:
C:\Users\Jamie\Desktop\dotXen SanAndreas\filterscripts\aHouse.pwn(30) : error 052multi-dimensional arrays must be fully initialized 
Btw, I didn't write this script so as for the naming schemes, I have no idea what to change them to.
Reply
#10

That errors means you haven't fully initialized an array like it says, so post the line the erros comes from
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)