Help with y_ini (i know its old as ... and so)
#1

Hello folks, im into something that i cant understand.

INI_String should be built by this way

name, destiantion, size

so i do this

INI_String("somenamehere",somecodehere, 32);

and gives me this errors:

PHP код:
error 001expected token")"but found "["
 
warning 215expression has no effect
 
error 001expected token";"but found "]"
error 029invalid expressionassumed zero
 
fatal error 107too many error messages on one line 
I found a stupid solution over the forums, to match the string as integer but i don't like that tag mismatch warnings i get. I have INI_String used twice as this, and there are no errors. Please just dont tell me to convert to mysql, 15k lines of code is hard to convert. I do not understand where the error comes. Everything is it at point.
Reply
#2

show code
Reply
#3

show your code so we can check for the error
Reply
#4

PHP код:
 public LoadHouse(idname[], value[])
{
   
INI_Float("XPos"HInfo[id][XPos]);
    
INI_Float("YPos"HInfo[id][YPos]);
    
INI_Float("ZPos"HInfo[id][ZPos]);
    
INI_Int("VirtualWorld"HInfo[id][VirtualWorld]);
    
INI_String("Name"HInfo[id][Name] , 200 );
    
INI_Int("Owned"HInfo[id][Owned]);
    
INI_String("Owner"HInfo[id][Owner] , 200 );
    
INI_Int("Price"HInfo[id][Price]);
    
INI_String("HouseLabel"HInfo[id][HouseLabel], 300); // error line
    
return 1;

Basically is just that, in fact there are no errors. I have just to define string as Integer, which i don't find as right. (numbers are on purporse, i havent finished it, im just testing).

PHP код:
stock ReadHouse(i)
{
    
HouseEnter[i] = CreateDynamicCP(HInfo[i][XPos],HInfo[i][YPos],HInfo[i][ZPos],1.5,HInfo[i][VirtualWorld]);
    
HouseExit[i] = CreateDynamicCP(443.9237,509.4609,1001.4195,1.5,HInfo[i][VirtualWorld]);
    new 
labelstring[256];
    switch(
HInfo[i][Owned])
    {
    case 
0:{format(labelstring,sizeof(labelstring),"Name: %s\n Owned: No \nPrice: %i",HInfo[i][Name],HInfo[i][Price]);}
    case 
1:{format(labelstring,sizeof(labelstring),"Name: %s\n Owned: Yes \nPrice: %i \nOwner: %s",HInfo[i][Name],HInfo[i][Price],HInfo[i][Owner]);}
    }
    
HInfo[i][HouseLabel] = Create3DTextLabel(labelstring,0xFF0000FF,HInfo[i][XPos],HInfo[i][YPos],HInfo[i][ZPos],25.0,HInfo[i][VirtualWorld]);
    
HouseCount++;

I am basically using this code to loop the data i got so i can load all the houses instead of just one.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)