SA-MP Forums Archive
Help ME OUT - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help ME OUT (/showthread.php?tid=662339)



Help ME OUT - Marv123 - 29.12.2018

Hello Friends
ERROR:
Код:
F:\*****\Tester\filterscripts\GangSystem.pwn(1426) : error 017: undefined symbol "total"
F:\*****\Tester\filterscripts\GangSystem.pwn(1427) : error 017: undefined symbol "playerid"
F:\*****\Tester\filterscripts\GangSystem.pwn(1429) : error 017: undefined symbol "playerid"
F:\*****\Tester\filterscripts\GangSystem.pwn(1430) : error 017: undefined symbol "i"
LINE:
Код:
1426:format(msg, sizeof(msg), "{FFFFFF}[{FFA000}GANG{FFFFFF}] {00FFB4}Your gang successfully captured '%s' with %d alive player(s)!", GangZone[zoneid][ZoneName],total);
1427:SendGangMessage(Player[playerid][PlayerGang], msg);
1428:format(msg, sizeof(msg), "{FFFFFF}[{FFA000}GANG{FFFFFF}] {00FFB4}The gang gained 7 gang score and each member $20,000 who were tied.");
1429:SendGangMessage(Player[playerid][PlayerGang], msg);
1430:format(msg, sizeof(msg), "{FFFFFF}GEF {FFA000} Gang %s captured zone '%s' which was territory of %s", Gang[gangid][GangName], GangZone[zoneid][ZoneName], GangZone[i][ZoneOwner]);
Help Me Friends
How to solve


Re: Help ME OUT - Kraeror - 29.12.2018

Where is defined the variable total and i and where did you pated the code?


Re: Help ME OUT - Marv123 - 29.12.2018

Код:
stock bool:CheckGang(gangid)
{
	new total = 0, query[128];
	mysql_format(connection, query, sizeof(query), "SELECT count(*) AS `total` FROM `member` WHERE `gang` = %d", Gang[gangid][GangID]);
	mysql_query(connection, query, true);
	total = (cache_num_rows() > 0) ? cache_get_field_content_int(0, "total") : 0;
	return (total >= MAX_GANG_MEMBER) ? false : true;
}



Re: Help ME OUT - Kraeror - 29.12.2018

"total" is created as local variable, so it can be used only in the stock! You have to create it as global one (at the top of your script). Also "i" is not defined!


Re: Help ME OUT - Marv123 - 29.12.2018

hey you have discord
bro my name and tag is this
Marv#0002
message is once bro


Re: Help ME OUT - Marv123 - 29.12.2018

Код:
F:\************\Tester\filterscripts\GangSystem.pwn(1426) : error 017: undefined symbol "playerid"
F:\************\Tester\filterscripts\GangSystem.pwn(1428) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Код:
SendGangMessage(Player[playerid][PlayerGang], msg);
SendGangMessage(Player[playerid][PlayerGang], msg);
same line


Re: Help ME OUT - iorp - 29.12.2018

Quote:
Originally Posted by Marv123
Посмотреть сообщение
Код:
F:\************\Tester\filterscripts\GangSystem.pwn(1426) : error 017: undefined symbol "playerid"
F:\************\Tester\filterscripts\GangSystem.pwn(1428) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Код:
SendGangMessage(Player[playerid][PlayerGang], msg);
SendGangMessage(Player[playerid][PlayerGang], msg);
same line
you probably, not passing playerid in this function


Re: Help ME OUT - Marv123 - 30.12.2018

Quote:
Originally Posted by iorp
Посмотреть сообщение
you probably, not passing playerid in this function
how to fix it bro


Re: Help ME OUT - Undef1ned - 30.12.2018

The identification of the player in the callback was not defined. Show your complete code (callback)


Re: Help ME OUT - Marv123 - 30.12.2018

@Undef1ned bro you have discord if you have can you tell name and tag


Re: Help ME OUT - iorp - 30.12.2018

show the function code, where you are using these calls


Re: Help ME OUT - Logic_ - 30.12.2018

Instead of just throwing up the code how everyone tells you to, maybe learn what is scripting and then fix this small issue your self. All what it needs is some knowledge.


Re: Help ME OUT - cuber - 30.12.2018

Quote:
Originally Posted by Logic_
Посмотреть сообщение
Instead of just throwing up the code how everyone tells you to, maybe learn what is scripting and then fix this small issue your self. All what it needs is some knowledge.
you're wrong, speed & code spooning is key sir thank!