SA-MP Forums Archive
Getting error, help fast - 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: Getting error, help fast (/showthread.php?tid=658513)



Getting error, help fast - DarknesS1988 - 05.09.2018

I've missed something.

This are the lines:

PHP код:
enum hInfo
{
    
Float:hEnterX,
    
Float:hEnterY,
    
Float:hEnterZ,
    
Float:hExitX,
    
Float:hExitY,
    
Float:hExitZ,
    
hInsideInt,
    
hInsideVir,
    
hOutsideVir,
    
hOutsideInt,
    
hOwned,
    
hOwner[24],
    
hTitle[15],
    
hPrice,
    
hPickup,
    
hIconID,
    
hCP,
    
bool:hCantRob,
    
Text3D:hTextLabel,
    
h_Vehicle_Save,
    
h_Vehicle_ID,
    
Float:h_Vehicle_x,
    
Float:h_Vehicle_y,
    
Float:h_Vehicle_z,
    
Float:h_Vehicle_a,
    
h_Vehiclecol1,
    
h_Vehiclecol2
};     
new 
HouseInfo[MAX_HOUSES][hInfo];
{   
//HERE'S THE START OF ERROR, what should i put here?
{2165.982177, -1671.14416515.073156,         2CP_TYPE_ENTRY0010.0   ,318.6376951117.2189941083.882812359.494110,         5,239    ,2167.530273, -1672.91748015.081041224.837097,     0,00.0,0.0,0.0,0.0,     0,0,     "Crack House" ,"Idlewood"},
{-
2490.996337, -38.92634525.617187,         2CP_TYPE_ENTRY005.0       ,-204.367492, -6.8794451002.273437355.418975,         17,240    ,-2493.817138, -38.85308425.76562589.545532,     0,00.0,0.0,0.0,0.0,     0,0,     "Tattoo Shop" ,"Hashbury"},
{
2094.7111812122.86474610.820312,         2CP_TYPE_ENTRY005.0       ,-204.345581, -42.2276421002.273437358.322052,         3,241    ,2094.8095702119.29809510.820312181.938064,     0,00.0,0.0,0.0,0.0,     0,0,     "Tattoo Shop" ,"Redsands East"},
{
2068.617675, -1779.89758313.559608,         2CP_TYPE_ENTRY005.0       ,-204.229339, -25.2516361002.273437356.041564,         16,242    ,2071.894287, -1779.82727013.557554265.782043,     0,00.0,0.0,0.0,0.0,     0,0,     "Tattoo Shop" ,"Idlewood"},
{
2070.626953, -1793.85876413.546875,         2CP_TYPE_ENTRY075.0       ,411.700592, -20.4299581001.8046871.543449,         2,243    ,2073.826171, -1793.80969213.546875266.868041,     0,00.0,0.0,0.0,0.0,     0,0,     "Barber Shop" ,"Idlewood"},
{
2724.435302, -2026.54748513.554687,         2CP_TYPE_ENTRY075.0       ,411.700592, -20.4299581001.8046871.543449,         2,244    ,2720.944580, -2026.66894513.54719992.545738,     0,00.0,0.0,0.0,0.0,     0,0,     "Barber Shop" ,"Player Del Seville"},
{-
2571.311279246.80206210.453931,         2CP_TYPE_ENTRY075.0       ,411.700592, -20.4299581001.8046871.543449,         2,245    ,-2568.690429244.11735510.295303224.522842,     0,00.0,0.0,0.0,0.0,     0,0,     "Barber Shop" ,"Queens"},
{
1456.534423, -1137.55529723.948390,         2CP_TYPE_ENTRY0455.0       ,161.450302, -94.1013251001.804687357.839141,         18,246    ,1458.437133, -1139.80407724.073740221.162368,     0,00.0,0.0,0.0,0.0,     0,0,     "Zip" ,"Downtown Los Santos"},
{
2571.9589841904.90100011.023437,         2CP_TYPE_ENTRY0455.0       ,161.450302, -94.1013251001.804687357.839141,         18,247    ,2572.1115721900.84875411.023437181.611450,     0,00.0,0.0,0.0,0.0,     0,0,     "Zip" ,"LV Shopping Centre"},
{-
1882.260375866.50714135.171875,         2CP_TYPE_ENTRY0455.0       ,161.450302, -94.1013251001.804687357.839141,         18,248    ,-1885.010620863.50671335.171875139.886627,     0,00.0,0.0,0.0,0.0,     0,0,     "Zip" ,"Downtown San Fierro"},
{
454.236389, -1478.07556130.816919,         2CP_TYPE_ENTRY0455.0   ,204.475357, -166.4555201000.5234373.518918,         14,249    ,451.086914, -1479.15808130.810012106.395690,     0,00.0,0.0,0.0,0.0,     0,0,     "Didier Sachs" ,"Rodeo"},
{
461.259002, -1500.87402331.059282,         2CP_TYPE_ENTRY02,  5.0   ,224.793151, -8.3180721002.21093791.903160,             5,250    ,458.016662, -1501.70690931.036149103.234809,     0,00.0,0.0,0.0,0.0,     0,0,     "Victim" ,"Rodeo"},
{-
1694.506835951.84692324.890625,         2CP_TYPE_ENTRY0455.0   ,224.793151, -8.3180721002.21093791.903160,             5,251    ,-1696.776000949.28015124.890625144.346572,     0,00.0,0.0,0.0,0.0,     0,0,     "Victim" ,"Financial"},
//....and 1000 more locations 
Errors:

PHP код:
D:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1148) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1150) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1173) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1182) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1213) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1222) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1229) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1232) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1237) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1240) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1243) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1245) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1253) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1257) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1277) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1309) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1318) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1334) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1338) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1362) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1367) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1375) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1379) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1383) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1385) : error 055start of function body without function header
D
:\Program Files\Samp SERVER 2018\samp037_svr_R2-1-1_win32\gamemodes\CnR.pwn(1460) : error 055start of function body without function header
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
26 Errors

Giverep for help.


Re: Getting error, help fast - Dayrion - 06.09.2018

Код:
new HouseInfo[MAX_HOUSES][hInfo]; 
{   //HERE'S THE START OF ERROR, what should i put here?
remove the semi-colon maybe??


Re: Getting error, help fast - iHollyZinhO - 06.09.2018

In this line:
Код:
new HouseInfo[MAX_HOUSES][hInfo];
You must use '=' instead of ';', for example:
PHP код:
new HouseInfo[MAX_HOUSES][hInfo] = 
{
    {
2165.982177, -1671.14416515.073156,         2CP_TYPE_ENTRY0010.0   ,318.6376951117.2189941083.882812359.494110,         5,239    ,2167.530273, -1672.91748015.081041224.837097,     0,00.0,0.0,0.0,0.0,     0,0,     "Crack House" ,"Idlewood"},
    {
2165.982177, -1671.14416515.073156,         2CP_TYPE_ENTRY0010.0   ,318.6376951117.2189941083.882812359.494110,         5,239    ,2167.530273, -1672.91748015.081041224.837097,     0,00.0,0.0,0.0,0.0,     0,0,     "Crack House" ,"Idlewood"}, 
    
//... and other lines
}; 



Re: Getting error, help fast - DarknesS1988 - 06.09.2018

Quote:
Originally Posted by iHollyZinhO
Посмотреть сообщение
In this line:
Код:
new HouseInfo[MAX_HOUSES][hInfo];
You must use '=' instead of ';', for example:
PHP код:
new HouseInfo[MAX_HOUSES][hInfo] = 
{
    {
2165.982177, -1671.14416515.073156,         2CP_TYPE_ENTRY0010.0   ,318.6376951117.2189941083.882812359.494110,         5,239    ,2167.530273, -1672.91748015.081041224.837097,     0,00.0,0.0,0.0,0.0,     0,0,     "Crack House" ,"Idlewood"},
    {
2165.982177, -1671.14416515.073156,         2CP_TYPE_ENTRY0010.0   ,318.6376951117.2189941083.882812359.494110,         5,239    ,2167.530273, -1672.91748015.081041224.837097,     0,00.0,0.0,0.0,0.0,     0,0,     "Crack House" ,"Idlewood"}, 
    
//... and other lines
}; 
Thanks, but it was something else. I've fixed it.

I want to know will this work. I've seen this in few servers and i'm trying to script it:
PHP код:
new Float:MoneyBagPos[3], MoneyBagActive 0MoneyBagLocation[50], MoneyBagPickup;//, MoneyBagTimer[2];
//Hours, Minutes, Seconds, Milliseconds
#define MoneyBagDelay(%1,%2,%3,%4) (%1*3600000)+(%2*60000)+(%3*1000)+%4
//20 = 200,000 minimum 30 = 200,000 -> 500,000
#define MoneyBagCash ((random(30)+20)*10000)
//I want to put it every day in 16:00, what should i set here? How to count? Should i use 24min (1 game day)*60sec gives me 1440seconds
#define MB_DELAY MoneyBagDelay(0, 500, 0, 0) //should i put 0,1440,0,0