SA-MP Forums Archive
help me with arrays - 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: help me with arrays (/showthread.php?tid=663200)



help me with arrays - Kraeror - 24.01.2019

Here is my array creation:
PHP Code:
enum hInfo
{
    
FloathExt[3],
        ...
}
new 
HouseInfo[300][hInfo]; 
Using:
PHP Code:
cache_get_value_name_float(i"X"HouseInfo[i][hExt[0]]);
        
cache_get_value_name_float(i"Y"HouseInfo[i][hExt[1]]);
        
cache_get_value_name_float(i"Z"HouseInfo[i][hExt[2]]); 
Erorr:
Quote:

error 028: invalid subscript (not an array or too many subscripts): "hExt"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

Please help me
Thanks!


Re: help me with arrays - Undef1ned - 24.01.2019

Must be: HouseInfo[i][hExt][1]....


Re: help me with arrays - Kraeror - 25.01.2019

Quote:
Originally Posted by Undef1ned
View Post
Must be: HouseInfo[i][hExt][1]....
THANKS! stupid mistake
+1 REP