PDA

View Full Version : Help on Foreach


popystone
25/08/2012, 08:41 AM
Help me on my foreach, I got this error..

C:\Users\aNdRe\Downloads\EG-RP - Copy (5)\0.3e USRP 0.3e\gamemodes\IL-RP.pwn(39) : fatal error 100: cannot read from file: "foreach"

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

Dan.
25/08/2012, 08:48 AM
You do not have the include 'foreach' in your pawno/includes folder.

Lordzy
25/08/2012, 08:53 AM
You must have "foreach" include in pawno->include.

Also you must open pawno and through there open your script.
Also the pawno.exe directory should be where all includes and stuffs are needed to run the script.

popystone
25/08/2012, 08:59 AM
I put my foreach in pawno/includes and still got that error.

RedJohn
25/08/2012, 09:01 AM
Your foreach file needs to be: foreach.inc
Not foreach(1).inc, or foreach .inc.

popystone
25/08/2012, 09:04 AM
When i rename it, Then i re-compile, my compiler stopped! So? What should i do now?

popystone
25/08/2012, 09:12 AM
Anyone can help me? :(

popystone
25/08/2012, 09:21 AM
HELP ME NOW PLEASE! :(( I NEED IT ON MY SERVER O.O

Cjgogo
25/08/2012, 09:24 AM
DO NOT BUMP your topic,PLUS,is FOR structure so hard to understand:
for(i=0;i<MAX_PLAYER;i++)
{
//code[if you use a function that has as params playerid replace it with i]
}

popystone
25/08/2012, 09:31 AM
i really need help. O.o

Universal
25/08/2012, 09:49 AM
1) Make sure you have the include in /pawno/includes/.
2) Try opening the PAWNO from the directory where your include and the server is.
3) You must have it included in your gamemode script.

popystone
25/08/2012, 09:56 AM
I do it, Still stopped.

Lordzy
25/08/2012, 09:59 AM
Check whether the name used is correct or not.

Example:
I included foreach but in include directory it is forach.
========

So check whether name is correct or not.

popystone
25/08/2012, 10:00 AM
Where will i put the "I included foreach" ?

Lordzy
25/08/2012, 10:08 AM
*Download foreach include.
*Copy and paste it in include folder.
*Go to pawno folder.
*Open pawno.exe
*In pawno.exe,open your script.
*Compile it.(Press F5 or choose compile option.)

NOTE:You must open Pawno from the directory where you've pasted foreach include.

kbalor
25/08/2012, 10:17 AM
Lordz;2078160']*Download foreach include.
*Copy and paste it in include folder.
*Go to pawno folder.
*Open pawno.exe
*In pawno.exe,open your script.
*Compile it.(Press F5 or choose compile option.)

NOTE:You must open Pawno from the directory where you've pasted foreach include.

Wow. You really do made a instruction..

@popystone.. Something like this in your Gamemode

#include <a_samp>
#include <zcmd>
#include <sscanf2>
#include <foreach>
//other include you use..


As Universal said you must have \pawno\include\foreach.inc

and make sure the spelling is right..

and Compile it again...

popystone
25/08/2012, 10:28 AM
This is my code on my Gamemode..

*/

#include <a_samp>
#include <streamer>
#include <a_zones>
#include <foreach>
#include <yom_buttons>
#include <djson>
#include <progress>
#include <YSI\y_timers>
#include <ZCMD>
#include <sscanf2>
#include <audio>

shitbird
25/08/2012, 10:33 AM
Make sure you don't have multiple server directories.
They may conflict with eachother, and cause this error.

Make sure the foreach include, http://forum.sa-mp.com/showthread.php?t=92679 - in the includes folder, which is located in the pawno folder.

popystone
25/08/2012, 10:38 AM
doesn't work O.o

shitbird
25/08/2012, 10:41 AM
You're doing something wrong.
Do as I advised you to, and it will work.

popystone
25/08/2012, 10:53 AM
Okay let's go back to the first Prob. Here is it.

Screenshot: http://tinypic.com/view.php?pic=2po89vl&s=6

Let's go to the first prob.

shitbird
25/08/2012, 10:56 AM
All I see is you exceeding some of the limits, but I don't know whether or not you are using a streamer.
And the YSI error, you can disregard that. It won't have any effect on your server, but you should probably check for updates manually, visit the official YSI topic for that.

popystone
25/08/2012, 11:03 AM
I need to fix that because i am using volt host, then when i try it to put in my volt the Gamemode name is Unknown and i think the prob is the "could not connect to YSI" When i download the Latest YSI and paste it on pawno/includes I got error and the error is "cannot read from file foreach."

shitbird
25/08/2012, 11:05 AM
Download the crashdetect plugin, and run it. Your console should get some warnings and errors.
Post them here, and we can take a look at it.

http://forum.sa-mp.com/showthread.php?t=262796