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



INI_String - [D]ry[D]esert - 10.04.2013

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]);
]


Re: INI_String - [XST]O_x - 10.04.2013

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.


Re: INI_String - [D]ry[D]esert - 10.04.2013

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.



Re: INI_String - [D]ry[D]esert - 10.04.2013

What is the possible mistakes do i made ?