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
#2

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);

     }
Reply
#3

Quote:
Originally Posted by flrp
Посмотреть сообщение
Third one:

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.
It is possible yes, but you need MySQL.
Reply
#4

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);

     }
Thanks its fixed now.
==/
Quote:
Originally Posted by Windows32
Посмотреть сообщение
It is possible yes, but you need MySQL.
could you give me some references please, ive been trying to find something like that
but haven't found anything like that, I mean, i don't want to use MYSQL to define the player variables and stuff, but i can use it if i can still use my %ini things

for example i want that

pPassword , stay pPassword, and not replace with something mysql related.


Basically i just want to use MYSQL to allow PHP to modify the player settings inside the /users/%.ini

as i stated on my example, for example adding +10000$ to the player.

NOTE: Added a new question please check the head of the thread
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)