Author Topic: file.inc  (Read 3372 times)

0 Members and 3 Guests are viewing this topic.

Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
file.inc
« on: July 27, 2011, 04:31:53 pm »
I found this with some functions that i think could help me.  Anyone wanna tell me how this function works?
I'm beginning to feel like a Lag God, Lag God

yazeen

  • Guest
Re: file.inc
« Reply #1 on: August 01, 2011, 05:28:16 pm »
INC means an include which contains inbuilt scripts on the file.no need to script it on the pawn file just include the file on the pawn file  8)

Example:
Create a Notepad save the file as Justinbieber.inc and paste it on pawno>include
Add these scripts on Justinbieber.inc and save it:

[pawn]stock IsNumber(const string[])
{
  new length=strlen(string);
  if (length==0) return false;
  for (new i = 0; i < length; i++)
    {
      if (
            (string > '9' || string < '0' && string!='-' && string!='+')
             || (string=='-' && i!=0)                                             
             || (string=='+' && i!=0)                                             
         ) return false;
    }
  if (length==1 && (string[0]=='-' || string[0]=='+')) return false;
  return true;
}[/pawn]

and on pawn script add [pawn] #include <Justinbieber>[/pawn]
now use it without adding this function on your pawn script

Hope it helped!!

Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
Re: file.inc
« Reply #2 on: August 01, 2011, 05:58:20 pm »
err.. i was asking what is the use of file.inc..
I'm beginning to feel like a Lag God, Lag God

yazeen

  • Guest
Re: file.inc
« Reply #3 on: August 01, 2011, 06:38:59 pm »
err.. i was asking what is the use of file.inc..

Oh my God OK here's a quick refer definition for it:
No need to script special functions on the pawn file just add it on INC file and include it on the pawn file and you dont get errors while compiling..

so, you want a [PDF] file format package with  included Video in it  ah?  :o

Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
Re: file.inc
« Reply #4 on: August 01, 2011, 06:47:36 pm »
I was meaning the function of file.inc.. how do i use the function in the file.inc?
I'm beginning to feel like a Lag God, Lag God

Offline BIG[H]

  • Made Man
  • ***
  • Posts: 159
  • Sight of light
    • View Profile
Re: file.inc
« Reply #5 on: August 04, 2011, 11:44:48 am »
INC means an include which contains inbuilt scripts on the file.no need to script it on the pawn file just include the file on the pawn file  8)

Example:
Create a Notepad save the file as Justinbieber.inc and paste it on pawno>include
Add these scripts on Justinbieber.inc and save it:

[pawn]stock IsNumber(const string[])
{
  new length=strlen(string);
  if (length==0) return false;
  for (new i = 0; i < length; i++)
    {
      if (
            (string > '9' || string < '0' && string!='-' && string!='+')
             || (string=='-' && i!=0)                                             
             || (string=='+' && i!=0)                                             
         ) return false;
    }
  if (length==1 && (string[0]=='-' || string[0]=='+')) return false;
  return true;
}[/pawn]

and on pawn script add [pawn] #include <Justinbieber>[/pawn]
now use it without adding this function on your pawn script

Hope it helped!!
Holy Crap.. do  you use this?

meh.. lag
 use this

[pawn]IsNum(const string[])
{// mike's function
   for (new i = 0, j = strlen(string); i < j; i++) { if (string > '9' || string < '0') return 0; }
   return 1;
}[/pawn]
Outdoor city server Administrator, FS server owner!