Author Topic: Having a problem with include "file"  (Read 2984 times)

0 Members and 1 Guest are viewing this topic.

Offline MaDKiLLeR

  • Wiseguy
  • **
  • Posts: 51
  • Pawn / Squirrel / PHP / HTML
    • View Profile
    • Humza Khan
Having a problem with include "file"
« on: September 27, 2011, 11:37:26 am »
i've a news system with /c setnews but i can't add it as the /c setnews uses the include file.

It says "Undefined Symbol: file" when i try to compile it.

i've added "Include <file>" to at the top and after adding it, i compiled it and then added the news system again and tried to compiled it but it gives me the same error again.

Any help will be appreciated  :)
- [VU_R]MaDKiLLeR

~ Site | Projects | IRC ~


Offline Ankit

  • Street Thug
  • *
  • Posts: 29
    • View Profile
Re: Having a problem with include "file"
« Reply #1 on: September 27, 2011, 03:26:16 pm »
If you Have Put The inc file correctly then it should work;
Use this :
[pawn]   else if (strcmp(cmd, "setnews", true) == 0) {
      new szMsg[256], setnews[256];
      tmp = strtok(cmdtext, idx);
      if(!IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_RED, "You need to Rcon login first!");
      else if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c setnews text");
      else {
         format(file, sizeof(file), "/News/News.ini", "News");
            format(setnews,sizeof(setnews),"By [%s]> %s ",gPlayers[playerid],cmdtext[7]);
         dini_Set(file, "News", setnews);
      }
      return 1;
   }][/pawn]

But You Have To Add A News Folder in
Im Telling You Step By Step
1)Open Your ScriptFiles Folder
2)Create a Folder named News
3)Copy the config file from ur config server folder
4)Paste it on Your News Folder
5)Open up config.ini from news fodler
6)Clear All the text
7)Add This line on that "News=By [[VR]Ankit]>  Server is Temporary now" without""
8)Save it
9)Rename it to News.ini
10)goto Server and do /c setnews [Text] After loggin through /admin [Pass]

Thanks for Reading My post 

.._@     .._@   <---- Snail Race!
« Last Edit: September 27, 2011, 03:30:45 pm by Ankit »
Name-Ankit Sharma
Age- 10
Location-India
WorkGroup:Small player and Scripter

Offline MaDKiLLeR

  • Wiseguy
  • **
  • Posts: 51
  • Pawn / Squirrel / PHP / HTML
    • View Profile
    • Humza Khan
Re: Having a problem with include "file"
« Reply #2 on: September 27, 2011, 03:34:34 pm »
lol, dude, i'm 80% pawn scripter. I know that all.

But i've the include "file"
The line "Include <file>" is written on the top of my scripts.
but it still gives error during compiling

"Undefined symbol: file"

on this line:

[pawn]
format(file, sizeof(file), "/News/News.ini", "News");[/pawn]
« Last Edit: September 27, 2011, 03:36:32 pm by MaDKiLLeR »
- [VU_R]MaDKiLLeR

~ Site | Projects | IRC ~


Offline MaDKiLLeR

  • Wiseguy
  • **
  • Posts: 51
  • Pawn / Squirrel / PHP / HTML
    • View Profile
    • Humza Khan
Re: Having a problem with include "file"
« Reply #3 on: September 27, 2011, 03:36:06 pm »

3)Copy the config file from ur config server folder
4)Paste it on Your News Folder
5)Open up config.ini from news fodler
6)Clear All the text
7)Add This line on that "News=By [[VR]Ankit]>  Server is Temporary now" without""
8)Save it
9)Rename it to News.ini
10)goto Server and do /c setnews [Text] After loggin through /admin [Pass]

Simply, create a new text document and save it as "News.ini". Who will do this?  :o
- [VU_R]MaDKiLLeR

~ Site | Projects | IRC ~


Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
Re: Having a problem with include "file"
« Reply #4 on: September 29, 2011, 04:57:53 am »
You put Include <file>right. I think the prob is you should put #include <file>
I'm beginning to feel like a Lag God, Lag God

yazeen

  • Guest
Re: Having a problem with include "file"
« Reply #5 on: September 29, 2011, 06:22:49 am »
God guys just add

[pawn]new file[128]; [/pawn] above this line [pawn]format(file, sizeof(file), "/News/News.ini", "News");[/pawn] and compile


* yazeen facepalms @ all

Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
Re: Having a problem with include "file"
« Reply #6 on: September 29, 2011, 06:44:17 am »
God guys just add

[pawn]new file[128]; [/pawn] above this line [pawn]format(file, sizeof(file), "/News/News.ini", "News");[/pawn] and compile


* yazeen facepalms @ all
Oh that he means???
* Fuzzy168 smiles
I'm beginning to feel like a Lag God, Lag God