Little Help needed
#1

Hey guys im trying to load a string with INI_String but it causing errors

pawn Код:
INI_String("Banned-By",PlayerInfo[playerid][BannedBy], 200);
Errors

pawn Код:
C:\Users\Ultra-Gaming\Desktop\FCRP\gamemodes\fcrp.pwn(42) : error 001: expected token: ")", but found "["
C:\Users\Ultra-Gaming\Desktop\FCRP\gamemodes\fcrp.pwn(42) : warning 215: expression has no effect
C:\Users\Ultra-Gaming\Desktop\FCRP\gamemodes\fcrp.pwn(42) : error 001: expected token: ";", but found "]"
C:\Users\Ultra-Gaming\Desktop\FCRP\gamemodes\fcrp.pwn(42) : error 029: invalid expression, assumed zero
C:\Users\Ultra-Gaming\Desktop\FCRP\gamemodes\fcrp.pwn(42) : fatal error 107: too many error messages on one line
Reply
#2

BannedBy is a string?

Ex:
pawn Код:
BannedBy[24]
Reply
#3

INI_String("Banned-By",PlayerInfo[playerid][BannedBy]), 200;

try this
Reply
#4

i removed , 200

pawn Код:
C:\Users\Ultra-Gaming\Desktop\FCRP\gamemodes\fcrp.pwn(42) : error 017: undefined symbol "INI_String"
but this should be part of YSI
Reply
#5

According to this
pawn Код:
INI_String("key", gValue, sizeof (gValue));
200 must come inside the bracket.[pawn]INI_String("Banned-By",PlayerInfo[playerid][BannedBy], 200);
Reply
#6

This is what i get now
also im trying to read Banned-By from a ini file

pawn Код:
C:\Users\Ultra-Gaming\Desktop\FCRP\gamemodes\fcrp.pwn(44) : error 017: undefined symbol "BannedBy"
C:\Users\Ultra-Gaming\Desktop\FCRP\gamemodes\fcrp.pwn(44) : warning 215: expression has no effect
C:\Users\Ultra-Gaming\Desktop\FCRP\gamemodes\fcrp.pwn(44) : error 001: expected token: ";", but found "]"
C:\Users\Ultra-Gaming\Desktop\FCRP\gamemodes\fcrp.pwn(44) : error 029: invalid expression, assumed zero
C:\Users\Ultra-Gaming\Desktop\FCRP\gamemodes\fcrp.pwn(44) : fatal error 107: too many error messages on one line
Reply
#7

Define BannedBy in your code.
Please post line 44.
Reply
#8

The Line
pawn Код:
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password",PlayerInfo[playerid][pPass]);
    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    INI_Int("Kills",PlayerInfo[playerid][pKills]);
    INI_Int("Banned",PlayerInfo[playerid][pBanned]);
    INI_String("Banned-By",PlayerInfo[playerid][pBannedBy]),200;
    return 1;
}
The Codes Now
pawn Код:
C:\Users\Ultra-Gaming\Desktop\FCRP\gamemodes\fcrp.pwn(44) : error 017: undefined symbol "INI_String"
C:\Users\Ultra-Gaming\Desktop\FCRP\gamemodes\fcrp.pwn(44) : warning 215: expression has no effect
Reply
#9

Quote:
Originally Posted by Ultra-Gaming
Посмотреть сообщение
The Line
pawn Код:
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password",PlayerInfo[playerid][pPass]);
    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    INI_Int("Kills",PlayerInfo[playerid][pKills]);
    INI_Int("Banned",PlayerInfo[playerid][pBanned]);
    INI_String("Banned-By",PlayerInfo[playerid][pBannedBy]),200;
    return 1;
}
The Codes Now
pawn Код:
C:\Users\Ultra-Gaming\Desktop\FCRP\gamemodes\fcrp.pwn(44) : error 017: undefined symbol "INI_String"
C:\Users\Ultra-Gaming\Desktop\FCRP\gamemodes\fcrp.pwn(44) : warning 215: expression has no effect
This should work or go to YSI thread and download again his libary
pawn Код:
INI_String("Banned-By", PlayerInfo[playerid][pBannedBy],200);
Reply
#10

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
BannedBy is a string?

Ex:
pawn Код:
BannedBy[24]
....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)