The Future Of SA-FE

Status
Not open for further replies.
Mave said:
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(50) : fatal error 100: cannot read from file: "YSF"

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


1 Error.


YSF

(It's in the damn folder)
The file is there, but the compiler doesn't have access to the file.
It could be because the file isn't readable, so remove this:
http://www.watchingthenet.com/wp-content/uploads/image/readonly1.gif
Or sometimes a reboot should help, too.

Btw this documentation is very useful for your scripting progress:
http://www.compuphase.com/pawn/Pawn_Language_Guide.pdf
On page 153 it explains all kinds of errors.
 
It was already 'not only readable'

I'll try a reboot later, can't now, taking backup

I'll let you know tomorrow in this topic if it worked or not

Thanks Remis
 
Mave said:
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(50) : fatal error 100: cannot read from file: "YSF"

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


1 Error.


YSF

(It's in the damn folder)

did u add #include YSF at the top and is YSF.inc in your include file?
 
DaDeathgod said:
Mave said:
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(50) : fatal error 100: cannot read from file: "YSF"

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


1 Error.


YSF

(It's in the damn folder)

did u add #include YSF at the top and is YSF.inc in your include file?
You don't need to include it again.

Check if YSF.inc is in your include folder it should be located straight in the include folder not in another one.

C:\Users\Mave\SA-MP\SA-FE\includes\YSF.inc

If the include is there, but pawno doesn't read it, which usually happens, do the following steps.
SA-MP Forums said:
1) Close Pawno
2) Copy/Move/ or Cut the Include file into the include folder. (\include)
3) Load up Pawno from it's direct source. DO NOT double click on your gamemode/ filterscript file (as most people do).
4) You should see a blank Pawno file open. Now Click on File>Open or type Ctrl+O or press the Open icon.
5) Locate your gamemode/filterscript file and open it.
6) IF you havn't got the include at the top add it, #include <YSF>
7) Compile, it, it Should work.

Got the steps from the SA:MP forums :wink:
 
C:\Users\Mave\SA-MP\SA-FE\pawno\include\a_cam.inc(75) : error 001: expected token: ";", but found "forward"
C:\Users\Mave\SA-MP\SA-FE\pawno\include\YSF.inc(95) : error 025: function heading differs from prototype
C:\Users\Mave\SA-MP\SA-FE\pawno\include\YSF.inc(95) : error 025: function heading differs from prototype
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(800) : error 017: undefined symbol "YCP_OnGameModeInit"
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(1887) : error 017: undefined symbol "SetStreamCheckpoint"
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(1888) : error 017: undefined symbol "SetStreamCheckpoint"
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(1889) : error 017: undefined symbol "SetStreamCheckpoint"
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(1990) : error 017: undefined symbol "YCP_OnPlayerConnect"
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(2358) : error 017: undefined symbol "YCP_OnPlayerEnterCheckpoint"
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(2362) : warning 235: public function lacks forward declaration (symbol "OnPlayerEnterStreamCheckpoint")
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(2908) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(3009) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(3097) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(3304) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(4924) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(4959) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(4981) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(5047) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(5071) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(5156) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(5206) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(5263) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(5336) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(5386) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(5441) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(5489) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(5592) : error 047: array sizes do not match, or destination array is too small

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


26 Errors.
 
001 expected token: token, but found token
A required token is omitted.

Example:
new abc << ";" is left there
forward

025 function heading differs from prototype
The number of arguments given at a previous declaration of the
function does not match the number of arguments given at the
current declaration.

Example:
my_function(var) return var;
my_function(1,32); << my_function has only one para.

047 array sizes do not match, or destination array is too small

For array assignment, the arrays on the left and the right side of the
assignment operator must have the same number of dimensions.
In addition:
⋄ for multi-dimensional arrays, both arrays must have the same
size;
⋄ for single arrays with a single dimension, the array on the left
side of the assignment operator must have a size that is equal or
bigger than the one on the right side.
When passing arrays to a function argument, these rules also hold
for the array that is passed to the function (in the function call)
versus the array declared in the function definition.
When a function returns an array, all return statements must
specify an array with the same size and dimensions.


235 public function lacks forward declaration (symbol name)
The script defines a public function, but no forward declaration of
this function is present. Possibly the function name was written
incorrectly. The requirement for forward declarations of public
functions guards against a common error.

You didn't forward a function.
How to fix this:
Remove the "public" before the function, example "public xyz()" to "xyz()". Or add a "stock", like "stock xyz()".
Or add the forward, "forward xyz(); public xyz() { }"

017 undefined symbol symbol
The symbol (variable, constant or function) is not declared.

Example:
public xyz(myvar)
{
return this_var_doesnt_exist; " this_var_doesnt_exist" isnt declared.
}

Fix:
public xyz(myvar)
{
new this_var_doesnt_exist;
return this_var_doesnt_exist;
}
 
Do you mind helping me step by step? I'll just post the first 3 errors here :)

C:\Users\Mave\SA-MP\SA-FE\pawno\include\a_cam.inc(75) : error 001: expected token: ";", but found "forward"
=
Code:
const Float:INF_FLOAT = Float:0x7F800000;
= line 75 in gm
=
Code:
forward CameraUpdate(playerid);
= line 75 in a_cam.inc

C:\Users\Mave\SA-MP\SA-FE\pawno\include\YSF.inc(95) : error 025: function heading differs from prototype
C:\Users\Mave\SA-MP\SA-FE\pawno\include\YSF.inc(95) : error 025: function heading differs from prototype
=
Code:
native frename(const oldname[], const newname[]);
= line 95 in YSF
=
Code:
// Anti-cheat
= line 95 in gm (I doubt it's this lol)
 
C:\Users\Mave\SA-MP\SA-FE\pawno\include\a_cam.inc(75) : error 001: expected token: ";", but found "forward"
=
Code:
const Float:INF_FLOAT = Float:0x7F800000;
= line 75 in gm
=
Code:
forward CameraUpdate(playerid);
= line 75 in a_cam.inc
Could you post line 74 of the "a_cam.inc"?

C:\Users\Mave\SA-MP\SA-FE\pawno\include\YSF.inc(95) : error 025: function heading differs from prototype
C:\Users\Mave\SA-MP\SA-FE\pawno\include\YSF.inc(95) : error 025: function heading differs from prototype
=
Code:
native frename(const oldname[], const newname[]);
= line 95 in YSF
=
Code:
// Anti-cheat
= line 95 in gm (I doubt it's this lol)
Hm, this should work fine. What happens if you remove the line?
Search everywhere you used "frename" and make sure it only has 2 params, and not 3 or 1 or whatever and only strings instead integers or whatever. Like this should be wrong: "frename("bla.inc", "new.inc", "xyz");"
 
Line 69-74

Code:
// "-Is" Forwards...
forward IsPlayerCameraMoving(playerid);
forward IsCameraPosInvalid(playerid);
forward IsCameraLookAtInvalid(playerid)

// Other forwards..
forward CameraUpdate(playerid);


And frename is never used in the GM :s
 
Well I would sure get a trustable scripter if I couldn't solve the issue of a missing ; at the end of the line.
Thank you FeaR for bringing up the trustability issue!
 
If zez would only want to edit the GM one last time, so that it's bugfree, so that I can start with a clean version...
 
Those issues are really simple to fix, you should try and learn a few things before starting.

C:\Users\Mave\SA-MP\SA-FE\pawno\include\a_cam.inc(75) : error 001: expected token: ";", but found "forward"
Your missing the ';' after the foward on line 74.

C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(800) : error 017: undefined symbol "YCP_OnGameModeInit"
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(1887) : error 017: undefined symbol "SetStreamCheckpoint"
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(1888) : error 017: undefined symbol "SetStreamCheckpoint"
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(1889) : error 017: undefined symbol "SetStreamCheckpoint"
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(1990) : error 017: undefined symbol "YCP_OnPlayerConnect"
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(2358) : error 017: undefined symbol "YCP_OnPlayerEnterCheckpoint"
Include Yaheli's checkpoint streamer.

C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(2362) : warning 235: public function lacks forward declaration (symbol "OnPlayerEnterStreamCheckpoint")
forward OnPlayerEnterStreamCheckpoint(playerid);

// Anti-cheat

= line 95 in gm (I doubt it's this lol)
There's no error on line 95 in the gamemode, It's in YSF.inc.

EDIT:
I would really suggest getting a scripter, than you can learn yourself over time, no offense but with the current scripting knowledge you have, will bring SA-FE no where. I would probably suggest Remis, but not sure if he's what you call 'trustable' after some of the things he has done.

Just get a few gamemodes and merge them together, just like what I did with SE xD. But yeah, I'm a much much (yes I needed it twice) more better scripter now than I was a month ago.
 
Your missing the ';' after the foward on line 74.
It is missing before the forward. Oh you meant line 74.

Mave, how many of the 26 errors are fixed now?
 
26 is the maximum amount of errors the PAWN compiler can supply you with at one time. There might be times * 26 errors in reality and there probably are because your arrays seem to be kind of messed up or such.
 
- The ';' has been added, so that error is fixed

- Fear, it's already included :/

Code:
#include <YCP>

- I've added

Code:
forward OnPlayerEnterStreamCheckpoint(playerid);

- Still 26 errors (as Andre explained probably a lot more)

Code:
C:\Users\Mave\SA-MP\SA-FE\pawno\include\YSF.inc(95) : error 025: function heading differs from prototype
C:\Users\Mave\SA-MP\SA-FE\pawno\include\YSF.inc(95) : error 025: function heading differs from prototype
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(801) : error 017: undefined symbol "YCP_OnGameModeInit"
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(1888) : error 017: undefined symbol "SetStreamCheckpoint"
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(1889) : error 017: undefined symbol "SetStreamCheckpoint"
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(1890) : error 017: undefined symbol "SetStreamCheckpoint"
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(1991) : error 017: undefined symbol "YCP_OnPlayerConnect"
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(2359) : error 017: undefined symbol "YCP_OnPlayerEnterCheckpoint"
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(2363) : error 025: function heading differs from prototype
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(2909) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(3010) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(3098) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(3305) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(4925) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(4960) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(4982) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(5048) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(5072) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(5157) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(5207) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(5264) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(5337) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(5387) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(5442) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(5490) : error 047: array sizes do not match, or destination array is too small
C:\Users\Mave\SA-MP\SA-FE\gamemodes\sfsa.pwn(5593) : error 047: array sizes do not match, or destination array is too small

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


26 Errors.
 
Re-download the checkpoint streamer, all the defines should be in the include.

http://www.zezombia.com/upload/Yaheli/YCP.inc

And for the rest of the errors, your arrays aren't the correct size, you can post lines 2909-3305, 4925, and the rest of the lines which the error is located in, and I would be able to help, if you are going to do that, please post the previous line and the line before.

Otherwise, wait for Zezombia to come online, or anyone who currently has the source.
 
K the errors regarding the YCP.inc have been fixed by replacing the inc, here are some of the array size bugs, maybe if you can tell me how to fix these ones, I can fix the others myself (without having to post every single one here)

2909-2910

Code:
		new tmp[128];
		tmp = strtok(cmdtext, idx);
		if(!tmp[0]) return SendClientMessage(playerid, COLOR_RED, ">> You use wheels as so: /wheels [part of/wheel name]");


3097-3099

Code:
		new tmp[128], tmp2[256], cmdid, ammount;
		tmp = strtok(cmdtext, idx);
		tmp2 = strtok(cmdtext, idx);
 
Mave said:
K the errors regarding the YCP.inc have been fixed by replacing the inc, here are some of the array size bugs, maybe if you can tell me how to fix these ones, I can fix the others myself (without having to post every single one here)

2909-2910

Code:
		new tmp[128];
		tmp = strtok(cmdtext, idx);
		if(!tmp[0]) return SendClientMessage(playerid, COLOR_RED, ">> You use wheels as so: /wheels [part of/wheel name]");


3097-3099

Code:
		new tmp[128], tmp2[256], cmdid, ammount;
		tmp = strtok(cmdtext, idx);
		tmp2 = strtok(cmdtext, idx);
Uh, yeah you should try out seifcmd, you won't have to create all those variables.

Anyway, Instead of constantly defining tmp, add it once under OnPlayerCommandText, to fix the errors simply increase the 'tmp' string to 256, this usually happens when having dini or dudb in your GameMode.

When I had this problem, what I did was open dini/dudb.inc and changed MAX_STRING to 128, that's a more simpler way.

EDIT:
If your using dini or dudb, open dutlis.inc located in your includes folder, in line 20 from the beginning you will see the define MAX_STRING, by default it's 256, change it to 128, re-compile the GameMode and all the errors that say 'array sizes do not match, or destination array is too small' should be fixed :wink:

And I recommend DJson, It's much more faster and more optimized than dini, It's pretty easy to convert.
 
Status
Not open for further replies.
Back
Top Bottom