SA-MP Forums Archive
Help +Rep - 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 +Rep (/showthread.php?tid=525800)



Help +Rep - ZachKnoxx - 13.07.2014

I get these errors

Код:
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\IBS\gamemodes\IBS.pwn(34634) : error 029: invalid expression, assumed zero
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\IBS\gamemodes\IBS.pwn(34634) : warning 215: expression has no effect
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\IBS\gamemodes\IBS.pwn(34634) : error 001: expected token: ";", but found "if"
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\IBS\gamemodes\IBS.pwn(34634) : error 001: expected token: "*then", but found ";"
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\IBS\gamemodes\IBS.pwn(34634) : fatal error 107: too many error messages on one line
when I use this:

Код:
	new rank[128];
	if(PlayerInfo[playerb][pFac] >= 1) format(rank, sizeof(rank), "%s", RPFRN(playerb));
	{
	else if format(rank, sizeof(rank), "None");
	}
 	else if(PlayerInfo[playerb][pFam] >=1) format(rank, sizeof(rank), "%s", RPFaRN(playerb));
	{
	else if format(rank, sizeof(rank), "None");
	}



Re: Help +Rep - Threshold - 13.07.2014

pawn Код:
new rank[128];
    if(PlayerInfo[playerb][pFac]) format(rank, sizeof(rank), "%s", RPFRN(playerb));
    else if(PlayerInfo[playerb][pFam]) format(rank, sizeof(rank), "%s", RPFaRN(playerb));
    else rank = "None";
I suggest you read up on 'else if' and 'else' statements, because your usage of them is currently incorrect.
https://sampwiki.blast.hk/wiki/Control_Structures


Re: Help +Rep - ZachKnoxx - 13.07.2014

Quote:
Originally Posted by Threshold
Посмотреть сообщение
pawn Код:
new rank[128];
    if(PlayerInfo[playerb][pFac]) format(rank, sizeof(rank), "%s", RPFRN(playerb));
    else if(PlayerInfo[playerb][pFam]) format(rank, sizeof(rank), "%s", RPFaRN(playerb));
    else rank = "None";
I suggest you read up on 'else if' and 'else' statements, because your usage of them is currently incorrect.
https://sampwiki.blast.hk/wiki/Control_Structures
Thanks. I know how to script, but it's one of those situations where I haven't scripted in a long time. +REP