SaveIn problem
#1

Hi all

I wrote a SaveIn script for myself, but when I want to use it, my pawn says "undefined symbol 'kick'".
the code:
pawn Код:
stock SaveIn(logname,text) {
    new
        text1[128],
        name[30],
        File:file;
    format(text1,sizeof(text1),"%s",text);
    format(name,sizeof(name),"Logs/%s.txt",logname);
    file = fopen(name,io_append);
    fwrite(file,text1);
    fclose(file);
}
the way I used it:

pawn Код:
SaveIn(ban,text);
please help

note: when I use like this: "SaveIn("kicks",text);" then it says argument type mismatch.
another note: please correct, not rewrite the code :]
Reply
#2

argument type mismatch means you have to put stock SaveIn(logname[],text[]) the [] if u have 2 put thing in a text like "ban"
Reply
#3

Thanks, solved! :]
Reply
#4

np
Reply
#5

1 more thing:
if I fread this, then how do I show only 6 lines?
Reply
#6

So how do I do that? Anyone?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)