help me with checking if file exists
#1

i am using filemanager
https://sampforum.blast.hk/showthread.php?tid=92246 (this one)
i want to check if a file exists or not using native file_exists
the problem is that i don't know how to do this. i mean that if it returns a value how can i save it or how can i use this in if conditions.
please help
and also one more help
when i type native its color does not change to blue what are the problems.
Reply
#2

if it returns false then the file does not exist, if it returns true then it does.
I got that information from reading the thread you linked, as I'm sure you could of done the same
Reply
#3

Quote:
Originally Posted by cessil
Посмотреть сообщение
if it returns false then the file does not exist, if it returns true then it does.
I got that information from reading the thread you linked, as I'm sure you could of done the same
that is fine
but how to use it?
Reply
#4

If true do stuff, if false do other stuff. Really, this is the core of programming.
Reply
#5

pawn Код:
if(file_exists("example.txt")) {
    // File exists
} else {
    // File does not exist
}
Why are you working with files if you don't understand the absolute backbone of programming?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)