INI_String
#1

Hello everyone, i am facing some problems about INI_String
INI_Int works fine, but when i use INI_String Error show to me and it says
pawn Код:
undefined symbol "INI_String"
i already have:
pawn Код:
#include <YSI\y_ini>
but i dont know why this showed to me..
Actually i got last version of YSI.
so do any one knows why this happened to me ?
This is my code:
pawn Код:
INI_String("Reason1",reasons[playerid][0][120]);
    INI_String("Reason2",reasons[playerid][1][120]);
    INI_String("Reason3",reasons[playerid][2][120]);
]
Reply
#2

You are missing an argument, which is the maximal size of the string.
pawn Код:
INI_String("Reason1",reasons[playerid][0][120], 128);
    INI_String("Reason2",reasons[playerid][1][120], 128);
    INI_String("Reason3",reasons[playerid][2][120], 128);
Replace 128 with whatever string size you need.
Reply
#3

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
You are missing an argument, which is the maximal size of the string.
pawn Код:
INI_String("Reason1",reasons[playerid][0][120], 128);
    INI_String("Reason2",reasons[playerid][1][120], 128);
    INI_String("Reason3",reasons[playerid][2][120], 128);
Replace 128 with whatever string size you need.
Ya, you are right, but after i fixed i faced another problem related to INI_String.
pawn Код:
new reasons[MAX_PLAYERS][3][120];

=> 411    INI_String("Reason1",reasons[playerid][0][120],120);
    INI_String("Reason2",reasons[playerid][1][120],120);
    INI_String("Reason3",reasons[playerid][2][120],120);
These are the Errors:
pawn Код:
C:\Users\HP\Desktop\Gta sa\Resident Evil [Main]\gamemodes\Zm.pwn(441) : error 032: array index out of bounds (variable "reasons")
C:\Users\HP\Desktop\Gta sa\Resident Evil [Main]\gamemodes\Zm.pwn(441) : warning 215: expression has no effect
C:\Users\HP\Desktop\Gta sa\Resident Evil [Main]\gamemodes\Zm.pwn(441) : error 001: expected token: ";", but found "]"
C:\Users\HP\Desktop\Gta sa\Resident Evil [Main]\gamemodes\Zm.pwn(441) : error 029: invalid expression, assumed zero
C:\Users\HP\Desktop\Gta sa\Resident Evil [Main]\gamemodes\Zm.pwn(441) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Reply
#4

What is the possible mistakes do i made ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)