File Reading
#1

pawn Код:
new read[11], filename[56], string[55];
       format(filename, sizeof(filename),"Players/%s.ini", name);
       fopen(filename, io_read);
       fread(filename, string);
It wont work, gives argument mismatch in all of em whats the issue?
Reply
#2

Files are assigned an ID which you use to work with:
pawn Код:
new read[11], filename[56], string[55];
format(filename, sizeof(filename),"Players/%s.ini", name);
new File:file = fopen(filename, io_read);
fread(file, string);
Reply
#3

Too late
Reply
#4

what about this?
pawn Код:
new filename[55], string[250];
       format(filename, sizeof(filename),"Players/%s.ini", name);
       new File:user = fopen(filename, io_write); // Open the file
       fopen(user, io_write);
       format(string, sizeof(string),"%s %s 0 0 0 299 0 0 0 255 1 0",name, inputtext);
       fwrite(user, string);
       fclose(user);
Reply
#5

Nvm, Fixed it But i can this error:
Код:
C:\Users\Administrator\Documents\SAMP 0.3b\gamemodes\WSRPG.pwn(1078) : error 033: array must be indexed (variable "inputtext")
on this:
pawn Код:
if(inputtext == read[1])
whats so wrong with it?
Reply
#6

24 Hour Bump, Please Help I tried configuring myself will this work:
pawn Код:
if(read[1] == strval(inputtext))
Thanks...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)