Pawn problems -
Sweez - 23.01.2013
Okay, i tried to make my own gamemode
But when i try to complie it gives me this:
C:\Users\User\Desktop\proekt\gamemodes\grandlarc.p wn(11) : fatal error 100: cannot read from file: "dini"
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
And from my folder "gamemodes" i can find only my .pwn file my .amx is missing. How can I fix it? If someone help me i will +Rep him
Re: Pawn problems -
Private200 - 23.01.2013
You haven't dini in your includes folder ( pawn/includes ) .
https://sampforum.blast.hk/showthread.php?tid=50
Download it from there and place it on "Your files folder / pawno / includes" .
If it still wont work , run pawn from your pawno folder and then open gamemode from it .
About this :
Quote:
Originally Posted by Sweez
And from my folder "gamemodes" i can find only my .pwn file my .amx is missing. How can I fix it? If someone help me i will +Rep him
|
You wont have your .amx file till it compiles correctly , otherwise it wont appear . No errors required to make your .amx files appear in your gamemodes folder .
Re: Pawn problems -
Sweez - 23.01.2013
Quote:
Originally Posted by Private200
You haven't dini in your includes folder ( pawn/includes ) .
https://sampforum.blast.hk/showthread.php?tid=50
Download it from there and place it on "Your files folder / pawno / includes" .
If it still wont work , run pawn from your pawno folder and then open gamemode from it .
About this :
You wont have your .amx file till it compiles correctly , otherwise it wont appear . No errors required to make your .amx files appear in your gamemodes folder .
|
It's almost working, but my pawn is crashing.
Re: Pawn problems -
Sweez - 23.01.2013
CAN ANYONE HELP ME ?
Re: Pawn problems -
Private200 - 23.01.2013
Give me some codes of what you changed . It happen to me also . You have done an problem on your scripting witch is not able to be run by pawno . That's why the error is being caused . You don't have much skills on scripting .If you want to do something , try to get the done gamemodes that are around the forums and practive on it . You'll get some skills on it . That's my idea if you want to have success in scripting .
Good luck
EDIT : Don't bump . We need codes to find out the errors . And being an huge script it is not able for us to find it out ! Do what i said below if you would like so . Try making your huge functions smaller . I mean something like if :
It can be used as
as well . Try to find something like that in your script .
Re: Pawn problems -
Sweez - 23.01.2013
My script is only 600 lines, here you about 50 of them that i changed.
Код:
#include <a_samp>
#include <core>
#include <float>
#include <dini>
#pragma tabsize 0
//----------------------------------------------------------
#define USERFILE "users.txt"
#define dcmd(%1,%2,%3) if ((strcmp(%3, "/%1", true, %2+1) == 0)&&(((%3[%2+1]==0)&&(dcmd_%1(playerid,"")))||((%3[%2+1]==32)&&(dcmd_%1(playerid,%3[%2+2]))))) return 1
#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_NORMAL_PLAYER 0xFFFFFFFF
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
new Tick[MAX_PLAYERS];
public OnPlayerUpdate(playerid)
{
Tick[playerid]++;
if(Tick[playerid] != 3) return 1;
Tick[playerid] = 0;
new Keys,up,down;
GetPlayerKeys(playerid,Keys,up,down);
new Float:x,Float:y,Float:z;
if(Keys &= 1024)
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
GetPlayerVelocity(playerid,x,y,z);
SetPlayerVelocity(playerid,x*1.2,y*1.2,z*1.2);
}
}
else if(Keys &= 4)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
GetVehicleVelocity(GetPlayerVehicleID(playerid),x,y,z);
SetVehicleVelocity(GetPlayerVehicleID(playerid),x*1.2,y*1.2,z*1.2);
}
}
return 1;
}
new total_vehicles_from_files=0;
// Class selection globals
new gPlayerCitySelection[MAX_PLAYERS];
new gPlayerHasCitySelected[MAX_PLAYERS];
new gPlayerLastCitySelectionTick[MAX_PLAYERS];
new Text:txtClassSelHelper;
new Text:txtLosSantos;
new Text:txtSanFierro;
new Text:txtLasVenturas;
new thisanimid=0;
new lastanimid=0;
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_HANDBRAKE)) // Change KEY_HANDBRAKE to your choice of PlayerKeys
{
new Float:x, Float:y, Float:z;
GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z);
SetVehicleVelocity(GetPlayerVehicleID(playerid) ,x ,y ,z+0.3);
}
return 1;
}
Re: Pawn problems -
DaRk_RaiN - 23.01.2013
Didn't crash to me..
Re: Pawn problems -
Private200 - 23.01.2013
It looks all fine here . Try to search for a script where you got many closing brackets .
pawn Код:
SendClientMessage(playerid, WHITE,"Hey samp forums");
}
}
}
Something like this .
Re: Pawn problems -
Sweez - 23.01.2013
Quote:
Originally Posted by DaRk_RaiN
Didn't crash to me..
|
That's not my full gamemode, its about 600 lines
Re: Pawn problems -
Private200 - 23.01.2013
Quote:
Originally Posted by Sweez
That's not my full gamemode, its about 600 lines
|
Then show us some of the codes where the problem get's out . I told you 2 reasons on how this problem can be caused . Try to find at least 1 of them in your script ..