SA-MP Forums Archive
enum - 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: enum (/showthread.php?tid=601708)



enum - SamJust - 25.02.2016

PHP код:
enum HouseInfo
{
    
Items[24],
    
Amount[24],
    
Float:houseinvpos[3]
}
new 
HousesInfo[2][HouseInfo] = {
    {{
0,...},{0,...},{2456.0,-1774.6,13.5}},
    {{
0,...},{0,...},{2476.0,-1774.6,13.5}}
}; 
And compiler output:
Quote:

C:\SA MP\gamemodes\FB_LS.pwn(214) : error 029: invalid expression, assumed zero
C:\SA MP\gamemodes\FB_LS.pwn(216) : error 010: invalid function or declaration
C:\SA MP\gamemodes\FB_LS.pwn(14909) : warning 203: symbol is never used: ""
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.




Re: enum - K0P - 25.02.2016

Код:
enum HouseInfo 
{ 
    Items[24], 
    Amount[24], 
    Float:houseinvpos[3] 
};

new HousesInfo[4][HouseInfo] = { 
    {"0,0,2456.0,-1774.6,13.5"}, 
    {"0,0,2476.0,-1774.6,13.5"} 
};



Re: enum - SamJust - 25.02.2016

The idea is to fill the houseinvpos with these (2456.0,-1774.6,13.5) numbers, and with this
PHP код:
new HousesInfo[4][HouseInfo] = { 
    {
"0,0,2456.0,-1774.6,13.5"}, 
    {
"0,0,2476.0,-1774.6,13.5"
}; 
I get zeros/


Re: enum - SamJust - 05.03.2016

Up. (And little addition to get more than 4 characters)