INI_String errors
#1

Brief: I don't know why this is happening, so if you could explain the problem that would be nice. I'm familiar with y_ini, but I never took the time to actually sit down and learn how to write it.

Код:
C:\Users\Aerotactics\Desktop\SAMP testing\gamemodes\rp.pwn(49) : error 001: expected token: ")", but found "["
C:\Users\Aerotactics\Desktop\SAMP testing\gamemodes\rp.pwn(49) : warning 215: expression has no effect
C:\Users\Aerotactics\Desktop\SAMP testing\gamemodes\rp.pwn(49) : error 001: expected token: ";", but found "]"
C:\Users\Aerotactics\Desktop\SAMP testing\gamemodes\rp.pwn(49) : error 029: invalid expression, assumed zero
C:\Users\Aerotactics\Desktop\SAMP testing\gamemodes\rp.pwn(49) : fatal error 107: too many error messages on one line
pawn Код:
enum bizinfo
{
    Float:EnX,
    Float:EnY,
    Float:EnZ,

    Float:ExX,
    Float:ExY,
    Float:ExZ,
   
    bizname[64],
    bowner[64],
    bprice,
    bincome,
    btype
}
new bInfo[MAX_BIZ][bizinfo];

//Error line
INI_String("BizName", bInfo[BizID][bizname], sizeof(bInfo[BizID][bizname]));
EDIT: added enum
EDIT 2: updated enum
EDIT 3: RESOLVED
Reply
#2

Try putting the exact size of it instead of putting sizeof.
Reply
#3

Try this:
pawn Код:
INI_String("BizName", bInfo[BizID][bizname], 128));
And when you want to define [bizname] under bInfo,change it to
pawn Код:
bizname[128],
Reply
#4

Quote:
Originally Posted by awsomedude
Посмотреть сообщение
Try putting the exact size of it instead of putting sizeof.
That's what it was at first, same errors.

Quote:
Originally Posted by R0
Посмотреть сообщение
You want it to save or load?
This is the loading script.

Quote:
Originally Posted by R0
Посмотреть сообщение
Try this:
pawn Код:
INI_String("BizName", bInfo[BizID][bizname], 128));
And when you want to define [bizname] under bInfo,change it to
pawn Код:
bizname[128],
Same errors.

EDIT: I missed the removed sizeof. It worked, thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)