help me with this script
#1

hi, i just edited a script from Fahadking, and after i compile it, i get this:
Код:
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(404) : error 017: undefined symbol "ClearChat"
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(409) : error 017: undefined symbol "HumanSetup"
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(411) : error 017: undefined symbol "CurePlayer"
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(440) : error 017: undefined symbol "UpdateMapName"
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(453) : error 017: undefined symbol "ClearObjects"
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(454) : error 017: undefined symbol "DestroyAllVehicle"
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(455) : error 017: undefined symbol "UnloadFilterScript"
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(456) : error 017: undefined symbol "LoadMap"
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(457) : error 017: undefined symbol "LoadFilterScript"
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(464) : error 017: undefined symbol "ChangeCameraView"
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(492) : error 017: undefined symbol "CreateEvacMaps"
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(503) : error 017: undefined symbol "GetTeamPlayersAlive"
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(514) : error 017: undefined symbol "GivePlayerXP"
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(531) : error 017: undefined symbol "PlayerName"
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(534) : error 017: undefined symbol "CurePlayer"
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(535) : error 017: undefined symbol "GivePlayerXP"
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(545) : error 017: undefined symbol "PlayerName"
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(548) : error 017: undefined symbol "CurePlayer"
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(549) : error 017: undefined symbol "GivePlayerXP"
but after i added those things on variable, i get this again:
Код:
C:\Users\JUSTIN\Documents\GTAhh\server\pawno\include\YSI\y_va/impl.inc(538) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\JUSTIN\Documents\GTAhh\server\pawno\include\YSI\y_va/impl.inc(538) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\JUSTIN\Documents\GTAhh\server\pawno\include\YSI\y_va/impl.inc(543) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\JUSTIN\Documents\GTAhh\server\pawno\include\YSI\y_va/impl.inc(543) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\JUSTIN\Documents\GTAhh\server\pawno\include\YSI\y_inline.inc(606) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(418) : error 012: invalid function call, not a valid address
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(418) : error 029: invalid expression, assumed zero
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(418) : warning 215: expression has no effect
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(423) : error 012: invalid function call, not a valid address
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(423) : warning 215: expression has no effect
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(423) : error 001: expected token: ";", but found ")"
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(423) : error 029: invalid expression, assumed zero
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(423) : fatal error 107: too many error messages on one line
can someone help me? this the codes from line 404 to 514:
Код:
function StartMap()
{
    ClearChat();
    foreach(Player,i)
	{
	    SetCameraBehindPlayer(i);
	    ClearAnimations(i);
		HumanSetup(i);
		SpawnPlayer(i);
		CurePlayer(i);
		SetPlayerDrunkLevel(i,0);
		DisablePlayerCheckpoint(i);
		pInfo[i][Boxes] = 2;
		pInfo[i][BoxesAdvanced] = 10;
		pInfo[i][SkinChanges] = 2;
		pInfo[i][ArmourChanges] = 2;
		pInfo[i][pVipBoxes] = 35;
		pInfo[i][pLadders] = 2;
		pInfo[i][pFakeKills] = 0;
		pInfo[i][pAmmoBoxes] = 10;
		pInfo[i][C4] = 4;
		pInfo[i][pTrapMasterTrap] = 1;
		pInfo[i][pScientistCure] = 1;
		pInfo[i][pDoctorShield] = 1;
		pInfo[i][pMapsPlayed]++;
		TextDrawHideForPlayer(i, ServerIntroOne[i]);
		TextDrawHideForPlayer(i, ServerIntroTwo[i]);
		DestroyPickup(meatDrops[i]);
		DestroyPickup(ammoDrops[i]);
		DestroyObject(DocShield);
		DestroyObject(Trap);
		TogglePlayerControllable(i,1);
	}

	gTime = MAX_MAPTIME;

	SetWeather(Map[Weather]);
	SetWorldTime(Map[Time]);
	UpdateMapName();
	SendClientMessageToAll(-1,""chat""COL_LGREEN" [Clear]"COL_WHITE" Chat Cleared "COL_YELLOW"[Reason: Next Map]");
	SendClientMessageToAll(-1,""chat""COL_RED" [Info]"COL_WHITE" XGreen is KING!");

    SetTimer("RandomZombie",1000,false);
    gateobj = CreateObject(Map[GateID],Map[GateX],Map[GateY],Map[GateZ],Map[GaterX],Map[GaterY],Map[GaterZ],500.0);
	mapvar = SetTimer("OnMapUpdate",MAX_MAPUPDATE_TIME,true);
	balvar = SetTimer("OnMapBalance",MAX_BALANCERUPDATE_TIME,true);
	return 1;
}
Im Just A Newbie in scripting, here is the .pwn file:
https://www.dropbox.com/s/rpsw9gq1u3wun5a/zma5.pwn?m=

please just correct my mistakes....
Reply
#2

Donwload This Includes :
https://sampforum.blast.hk/showthread.php?tid=321092

+Rep if i helped You !?
Reply
#3

Quote:
Originally Posted by GeekSiMo
Посмотреть сообщение
Donwload This Includes :
https://sampforum.blast.hk/showthread.php?tid=321092

+Rep if i helped You !?
i already installed it. but same happens
Reply
#4

i installed the YSI 3.1 but, i dont know the version is needed with my script, and i dont know how to correctly install it, i just putted the YSI folder in pawno/include folder.
Reply
#5

search for the line of ClearChat(); stock
Reply
#6

Quote:
Originally Posted by GeekSiMo
Посмотреть сообщение
search for the line of ClearChat(); stock
the line is from 404 to 531 and some errors is in there.
Код:
{
    ClearChat();
    foreach(Player,i)
	{
	    SetCameraBehindPlayer(i);
	    ClearAnimations(i);
		HumanSetup(i);
		SpawnPlayer(i);
		CurePlayer(i);
		SetPlayerDrunkLevel(i,0);
		DisablePlayerCheckpoint(i);
		pInfo[i][Boxes] = 2;
		pInfo[i][BoxesAdvanced] = 10;
		pInfo[i][SkinChanges] = 2;
		pInfo[i][ArmourChanges] = 2;
		pInfo[i][pVipBoxes] = 35;
		pInfo[i][pLadders] = 2;
		pInfo[i][pFakeKills] = 0;
		pInfo[i][pAmmoBoxes] = 10;
		pInfo[i][C4] = 4;
		pInfo[i][pTrapMasterTrap] = 1;
		pInfo[i][pScientistCure] = 1;
		pInfo[i][pDoctorShield] = 1;
		pInfo[i][pMapsPlayed]++;
		TextDrawHideForPlayer(i, ServerIntroOne[i]);
		TextDrawHideForPlayer(i, ServerIntroTwo[i]);
		DestroyPickup(meatDrops[i]);
		DestroyPickup(ammoDrops[i]);
		DestroyObject(DocShield);
		DestroyObject(Trap);
		TogglePlayerControllable(i,1);
	}

	gTime = MAX_MAPTIME;

	SetWeather(Map[Weather]);
	SetWorldTime(Map[Time]);
	UpdateMapName();
	SendClientMessageToAll(-1,""chat""COL_LGREEN" [Clear]"COL_WHITE" Chat Cleared "COL_YELLOW"[Reason: Next Map]");
	SendClientMessageToAll(-1,""chat""COL_RED" [Info]"COL_WHITE" XGreen is KING!");

    SetTimer("RandomZombie",1000,false);
    gateobj = CreateObject(Map[GateID],Map[GateX],Map[GateY],Map[GateZ],Map[GaterX],Map[GaterY],Map[GaterZ],500.0);
	mapvar = SetTimer("OnMapUpdate",MAX_MAPUPDATE_TIME,true);
	balvar = SetTimer("OnMapBalance",MAX_BALANCERUPDATE_TIME,true);
	return 1;
}
its already posted in main topic.
Reply
#7

*bump
Reply
#8

As error in:
Quote:
Код:
C:\Users\JUSTIN\Documents\GTAhh\server\pawno\include\YSI\y_va/impl.inc(538) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\JUSTIN\Documents\GTAhh\server\pawno\include\YSI\y_va/impl.inc(538) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\JUSTIN\Documents\GTAhh\server\pawno\include\YSI\y_va/impl.inc(543) : warning 219: local variable "x" shadows a variable at a preceding level
C:\Users\JUSTIN\Documents\GTAhh\server\pawno\include\YSI\y_va/impl.inc(543) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\JUSTIN\Documents\GTAhh\server\pawno\include\YSI\y_inline.inc(606) : warning 219: local variable "y" shadows a variable at a preceding level
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(418) : error 012: invalid function call, not a valid address
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(418) : error 029: invalid expression, assumed zero
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(418) : warning 215: expression has no effect
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(423) : error 012: invalid function call, not a valid address
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(423) : warning 215: expression has no effect
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(423) : error 001: expected token: ";", but found ")"
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(423) : error 029: invalid expression, assumed zero
C:\Users\JUSTIN\Desktop\Linux Version [0.3z]\gamemodes\zma5.pwn(423) : fatal error 107: too many error messages on one line
Line 418 and 423 is included
PHP код:
(404ClearChat();
(
405)foreach(Player,i)
(
406)    {
(
407)        SetCameraBehindPlayer(i);
(
408)        ClearAnimations(i);
(
409)        HumanSetup(i);
(
410)        SpawnPlayer(i);
(
411)        CurePlayer(i);
(
412)        SetPlayerDrunkLevel(i,0);
(
413)        DisablePlayerCheckpoint(i);
(
414)        pInfo[i][Boxes] = 2;
(
415)        pInfo[i][BoxesAdvanced] = 10;
(
416)        pInfo[i][SkinChanges] = 2;
(
417)        pInfo[i][ArmourChanges] = 2;
(
418)        pInfo[i][pVipBoxes] = 35;
(
419)        pInfo[i][pLadders] = 2;
(
420)        pInfo[i][pFakeKills] = 0;
(
421)        pInfo[i][pAmmoBoxes] = 10;
(
422)        pInfo[i][C4] = 4;
(
423)        pInfo[i][pTrapMasterTrap] = 1;
(
424)        pInfo[i][pScientistCure] = 1;
(
425)        pInfo[i][pDoctorShield] = 1;
(
426)        pInfo[i][pMapsPlayed]++;
(
427)        TextDrawHideForPlayer(iServerIntroOne[i]);
(
428)        TextDrawHideForPlayer(iServerIntroTwo[i]);
(
429)        DestroyPickup(meatDrops[i]);
(
430)        DestroyPickup(ammoDrops[i]);
(
431)        DestroyObject(DocShield);
(
432)        DestroyObject(Trap);
(
433)        TogglePlayerControllable(i,1);
    } 
Line 538 and 543 is included
PHP код:
        new string[256];
        if(
Map[EvacType] == 1)
        {
            
SetPlayerInterior(playerid,0);
            
SetPlayerPos(playerid,-1408.2051,-970.8841,198.9738);
            
format(string,sizeof(string), ""chat""COL_LIGHTBLUE" %s made it to evacuation point and has received 1 coin!",PlayerName(playerid));
            
SendClientMessageToAll(-1,string);
            
DisablePlayerCheckpoint(playerid);
            
CurePlayer(playerid);
            
GivePlayerXP(playerid,50);
            
pInfo[playerid][pEvac]++;
            
pInfo[playerid][pCoins]++;
(
538)            SetPlayerColor(playerid,COLOR_YELLOW);
        }
        if(
Map[EvacType] == 2)
        {
(
543)            SetPlayerPos(playerid,3024.4983,447.9744,14.7813);
            
SetPlayerInterior(playerid,0);
            
format(string,sizeof(string), ""chat""COL_LIGHTBLUE" %s made it to the water evacuation point and has received 1 coin!",PlayerName(playerid));
            
SendClientMessageToAll(-1,string);
            
DisablePlayerCheckpoint(playerid);
            
CurePlayer(playerid);
            
GivePlayerXP(playerid,50);
            
pInfo[playerid][pEvac]++;
            
pInfo[playerid][pCoins]++;
            
SetPlayerColor(playerid,COLOR_YELLOW);
        } 
And Line 606:
PHP код:
    if(team[playerid] == TEAM_HUMAN)
    {
        if(
pInfo[playerid][pHumanClass] == ENGINEER || pInfo[playerid][pHumanClass] == ADVANCEDENGINEER || pInfo[playerid][pHumanClass] == VIPENGINEER || pInfo[playerid][pHumanClass] == E_ENGINEER || pInfo[playerid][pHumanClass] == TRAPMASTER || pInfo[playerid][pHumanClass] == BOMBER)
        {
            switch(
pInfo[playerid][pHumanClass])
            {
                case 
ENGINEERpInfo[playerid][Boxes]++,GameTextForPlayer(playerid,"~g~Found~w~: 1 Box",4000,5),DestroyPickup(meatDrops[playerid]);
                case 
ADVANCEDENGINEERpInfo[playerid][BoxesAdvanced] += 2,GameTextForPlayer(playerid,"~g~Found~w~: 2 Boxes",4000,5),DestroyPickup(meatDrops[playerid]);
(
606)            case VIPENGINEERpInfo[playerid][pVipBoxes] += 3,GameTextForPlayer(playerid,"~g~Found~w~: 3 Boxes",4000,5),DestroyPickup(meatDrops[playerid]);
                case 
E_ENGINEERpInfo[playerid][pLadders] += 1,GameTextForPlayer(playerid,"~g~Found~w~: 1 Ladders",4000,5),DestroyPickup(meatDrops[playerid]);
                case 
TRAPMASTERpInfo[playerid][pTrapMasterTrap] += 1,GameTextForPlayer(playerid,"~g~Found~w~: 1 trap",4000,5),DestroyPickup(meatDrops[playerid]);
                case 
BOMBERpInfo[playerid][pXP] += 10,GameTextForPlayer(playerid,"~g~Found~w~: 10 xp",4000,5),DestroyPickup(meatDrops[playerid]);
            }
        } 
Reply
#9

It means you have mismatching braces somewhere.

aka
pawn Код:
if(Hello)
{

}
else
{

Check all the places you edited recently.
Reply
#10

Quote:
Originally Posted by ikey07
Посмотреть сообщение
It means you have mismatching braces somewhere.

aka
pawn Код:
if(Hello)
{

}
else
{

Check all the places you edited recently.
there is no braces i missed, i guess...
BTW, try to find my errors in the .pwn file that i added, to correct my mistakes
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)