Error Gamemode
#1

Hello,
when i tried to compile the Gamemode i had this error:

Quote:

C:\Users\Name\Desktop\Samp\gamemodes\Samp2.pwn(471 5) : warning 217: loose indentation
C:\Users\Name\Desktop\Samp\gamemodes\Samp2.pwn(471 5) : error 017: undefined symbol "string22"
C:\Users\Name\Desktop\Samp\gamemodes\Samp2.pwn(471 5) : warning 215: expression has no effect
C:\Users\Name\Desktop\Samp\gamemodes\Samp2.pwn(471 5) : error 001: expected token: ";", but found "]"
C:\Users\Name\Desktop\Samp\gamemodes\Samp2.pwn(471 5) : error 029: invalid expression, assumed zero
C:\Users\Name\Desktop\Samp\gamemodes\Samp2.pwn(471 5) : fatal error 107: too many error messages on one line

Code:
//-----------------------------------------------------------------------------------------
TazerAcceso[playerid] = 0;

ShiftInfo[playerid] = (ShiftInfo[playerid] == false) ? (true) : (true);
ShiftTimer[playerid] = SetTimerEx("ShiftFunction", 200, true, "e", playerid);

TextDrawShowForPlayer(playerid, Text:textcl5);
gPlayerUsingLoopingAnim[playerid] = 0;
gPlayerAnimLibsPreloaded[playerid] = 0;


new name[MAX_PLAYER_NAME];
     string22[100+MAX_PLAYER_NAME];

    new plname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, plname, sizeof(plname));

    new namestring = strfind(plname, "_", true);
 	if(namestring == -1)
	{
		SendClientMessage(playerid, COLOR_YELLOW2, "{37F906}INFO:{FFFFFF} This name cannot be use.");
		SendClientMessage(playerid, COLOR_YELLOW2, "{37F906}INFO:{FFFFFF} Your name must be Name_Surname.");
		SendClientMessage(playerid, COLOR_YELLOW2, "{37F906}INFO:{FFFFFF} Example: Nick_Wronx.");
		Kick(playerid);
		return 1;
	}
How i can fix it?
Reply
#2

pawn Code:
//-----------------------------------------------------------------------------------------
    TazerAcceso[playerid] = 0;

    ShiftInfo[playerid] = (ShiftInfo[playerid] == false) ? (true) : (true);
    ShiftTimer[playerid] = SetTimerEx("ShiftFunction", 200, true, "e", playerid);

    TextDrawShowForPlayer(playerid, Text:textcl5);
    gPlayerUsingLoopingAnim[playerid] = 0;
    gPlayerAnimLibsPreloaded[playerid] = 0;


    new name[MAX_PLAYER_NAME];
    new string22[100+MAX_PLAYER_NAME];

    new plname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, plname, sizeof(plname));

    new namestring = strfind(plname, "_", true);
    if(namestring == -1)
    {
        SendClientMessage(playerid, COLOR_YELLOW2, "{37F906}INFO:{FFFFFF} Vaseto ime nemoze da se koristi.");
        SendClientMessage(playerid, COLOR_YELLOW2, "{37F906}INFO:{FFFFFF} Vaseto ime mora da bidne Ime_Prezime.");
        SendClientMessage(playerid, COLOR_YELLOW2, "{37F906}INFO:{FFFFFF} Primer: Nick_Wronx.");
        Kick(playerid);
        return 1;
    }
You forgot to place the new statement before string22.
Reply
#3

pawn Code:
new string22[100+MAX_PLAYER_NAME];
Or better:
pawn Code:
new name[MAX_PLAYER_NAME], string22[100+MAX_PLAYER_NAME], plname[MAX_PLAYER_NAME];
Put all your variables to declare on one line.
Reply
#4

Thanks!!!!!!
It's ok, but now i have only this error:

Quote:

gamemodes\Samp.pwn(6194) : warning 208: function with tag result used before definition, forcing reparse.

pawn Code:
public Float:Streamer_OnPlayerEnterCP(playerid)
{
    DisablePlayerCheckpoint(playerid);
    SendClientMessage(playerid, 0xFFFFFFFF, "{FFFFFF}GPS | {00C0FF}You've come to the place selected!");
    new var0[128];
    new var1[128];
    new var2[24];
How i can fix it?
Thanks Again!
Reply
#5

public Float:Streamer_OnPlayerEnterCP(playerid)

Try removing that Float: tag.
Reply
#6

Thanks!!!
Ok, i compile the gamemode, but now, when i tried to run the server, i have this error:

Script[gamemodes/GWRPGZ.amx]: Run time error 17: Invalid/unsupported P-code file format"
Failed to load "gamemode/GWRPGZ.amx" script


Reply
#7

Are you using some special arguements to complie?
See if you have a pawno.cfg inside your PAWN folder.

If you don't, try to complie the script fully first untill it says, "OK." and shows the window with information.
And then try to run it, be sure to load all plugins, server.cfg and all.
Reply
#8

Let the script compile first, then close it, and after that start the server. You are trying to run corrupted .amx compiled file.
Reply
#9

Quote:
Originally Posted by BullseyeHawk
View Post
Are you using some special arguements to complie?
See if you have a pawno.cfg inside your PAWN folder.

If you don't, try to complie the script fully first untill it says, "OK." and shows the window with information.
And then try to run it, be sure to load all plugins, server.cfg and all.
I don't have pawn.cfg inside my PAWN folder.

I use PawnoX to compile this gamemode because with Pawno nothing is happening.
When i tried to compile it with Pawno this happens:



Quote:
Originally Posted by iZN
View Post
Let the script compile first, then close it, and after that start the server. You are trying to run corrupted .amx compiled file.
I tried but i have the same problem
Reply
#10

That happens because you have to wait a minute or so when that white box pops up. then the white box will say your errors and warnings. If you have any.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)