A few questions i have
#1

Hello, i made this thread to try to solve a few problems and also to improve my knowledge in pawno.

Allright first one:
Update: Solved by MySelf
Decided to remove it, because it was too stupid.

Second one:
Update: Solved by Speedico

How do i remove all the files inside a folder when the server starts ( "ongamemodeinit") ?
Don't ask why, if i would have to explain the reason of this you would have to check my old thread of "Assigning an ID to a car".

Allright so this is my code:
PHP код:
        new fstr[128];
     for (
f=0;f<=9999;f++) // line of the error
     
{
         
format(fstr,sizeof fstr"Vehicles/%i.ini",f)
         if (
fexist(fstr)) fremove(fstr);
     } 
I get 4 errors

pawn Код:
C:\[hidden](16232) : error 017: undefined symbol "f"
C:\[hidden](16232) : warning 205: redundant code: constant expression is zero
C:\[hidden](16232) : error 017: undefined symbol "f"
C:\[hidden](16232) : warning 215: expression has no effect
C:\[hidden](16232) : error 001: expected token: ")", but found ";"
C:\[hidden](16232) : 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.
Fixed code:
Quote:
Originally Posted by spedico
Посмотреть сообщение
pawn Код:
new fstr[128];
     for (new f=0;f<=9999;f++) // line of the error
     {
         format(fstr,sizeof(fstr), "Vehicles/%i.ini",f)
         if (fexist(fstr)) fremove(fstr);

     }

Third:
Not solved yet
Is that possible to use PHP to interact with my server ini files.

e.g i press on a button on a PHP coded page and it adds +10.000$ to the account i type on the textbox
I'm asking this because i dont really feel like swaping my ini GM to mysql, hard and long work.


Forth:
Not solved yet
How do i check how many cars are currently spawned?
(i mean a pawno script that would return me the value of the number of the cars spawned)
Reply


Messages In This Thread
A few questions i have - by flrp - 15.05.2012, 18:39
Re: A few questions i have - by spedico - 15.05.2012, 18:42
Re: A few questions i have - by Elysian` - 15.05.2012, 18:45
Re: A few questions i have - by flrp - 15.05.2012, 19:12

Forum Jump:


Users browsing this thread: 1 Guest(s)