SA-MP Forums Archive
4 error in 1 line - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 4 error in 1 line (/showthread.php?tid=186296)



4 error in 1 line - mhking - 28.10.2010

How to fix

C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\stunt1.pwn(1409) : error 029: invalid expression, assumed zero
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\stunt1.pwn(1409) : warning 215: expression has no effect
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\stunt1.pwn(1409) : error 001: expected token: ";", but found "if"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\stunt1.pwn(1409) : error 017: undefined symbol "Connected"
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\stunt1.pwn(1409) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


Re: 4 error in 1 line - Alex_Valde - 28.10.2010

Can you show us the line


Re: 4 error in 1 line - mhking - 28.10.2010

( Line 1409 ) else if (Connected[playerid] == 1)


Re: 4 error in 1 line - DeathOnaStick - 28.10.2010

You forgot a ";" in the end of the last line. In future post your code. It's necessary.


Re: 4 error in 1 line - Hiddos - 28.10.2010

Quote:
Originally Posted by DeathOnaStick
Посмотреть сообщение
You forgot a ";" in the end of the last line. In future post your code. It's necessary.
Errno.

You didn't declare/created the "Connected" variable


Re: 4 error in 1 line - DeathOnaStick - 28.10.2010

Quote:
Originally Posted by Hiddos
Посмотреть сообщение
Errno.

You didn't declare/created the "Connected" variable
Erryes
Proof:
Код:
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\stunt1.pwn(1409) : error 001: expected token: ";", but found "if"
There must be a ";" missing, 100% sure
Anyway, your point is still correct. Seems like there is more wrong than just these things. I guess we need more code to totally fix it.


Re: 4 error in 1 line - mhking - 28.10.2010

I added ";" end of line 1409 else if (Connected[playerid] == 1); but still same errors


Re: 4 error in 1 line - DeathOnaStick - 28.10.2010

Quote:
Originally Posted by mhking
Посмотреть сообщение
I added ";" end of line 1409 else if (Connected[playerid] == 1); but still same errors
No i did not mean that... -_-. . Show us the necessary code to fix the errors.

[gay]This forum requires that you wait 120 seconds between posts. Please try again in 31 seconds.[/gay]


Re: 4 error in 1 line - mhking - 28.10.2010

Код:
public OnPlayerDisconnect(playerid, reason)
{
	PlayerPlaySound(playerid, 1185+1, 0.0, 0.0, 0.0);
	ShowNameTags(1);
	ShowPlayerMarkers(1);
	{
	    SetPlayerPos(playerid,-688.0696,942.0925,16.8293);
        SetPlayerInterior(playerid,0);
        SetCameraBehindPlayer(playerid);
        SetPlayerFacingAngle(playerid,178);
	}
	else  if (Connected[playerid] == 1)
	{
	    Connected[playerid] = 0;
	    SetPlayerInterior(playerid,0);
	    SendClientMessage(playerid,GREEN,"Welcome to Stunt1 server!");
	    SendClientMessage(playerid,GREEN,"Would be much appreciated if you read the rules ( /rules ) and view all our commands for you ( /commands )!");
	    SendClientMessage(playerid,GREEN,"If you need any help, ask an admin. Report a cheater/rule breaker if due to an admin. And have fun!");
	    GameTextForPlayer(playerid,"~r~~h~/commands~n~~g~/rules",5000,6);
	}
	else
	{
		SetPlayerInterior(playerid,0);
	}
	return 1;
}



Re: 4 error in 1 line - DeathOnaStick - 28.10.2010

Quote:
Originally Posted by mhking
Посмотреть сообщение
Код:
public OnPlayerDisconnect(playerid, reason)
{
	PlayerPlaySound(playerid, 1185+1, 0.0, 0.0, 0.0);
	ShowNameTags(1);
	ShowPlayerMarkers(1);
	{
	    SetPlayerPos(playerid,-688.0696,942.0925,16.8293);
        SetPlayerInterior(playerid,0);
        SetCameraBehindPlayer(playerid);
        SetPlayerFacingAngle(playerid,178);
	}
	else  if (Connected[playerid] == 1)
	{
	    Connected[playerid] = 0;
	    SetPlayerInterior(playerid,0);
	    SendClientMessage(playerid,GREEN,"Welcome to Stunt1 server!");
	    SendClientMessage(playerid,GREEN,"Would be much appreciated if you read the rules ( /rules ) and view all our commands for you ( /commands )!");
	    SendClientMessage(playerid,GREEN,"If you need any help, ask an admin. Report a cheater/rule breaker if due to an admin. And have fun!");
	    GameTextForPlayer(playerid,"~r~~h~/commands~n~~g~/rules",5000,6);
	}
	else
	{
		SetPlayerInterior(playerid,0);
	}
	return 1;
}
pawn Код:
else  if (Connected[playerid] == 1)
    {
        Connected[playerid] = 0;
        SetPlayerInterior(playerid,0);
        SendClientMessage(playerid,GREEN,"Welcome to Stunt1 server!");
        SendClientMessage(playerid,GREEN,"Would be much appreciated if you read the rules ( /rules ) and view all our commands for you ( /commands )!");
        SendClientMessage(playerid,GREEN,"If you need any help, ask an admin. Report a cheater/rule breaker if due to an admin. And have fun!");
        GameTextForPlayer(playerid,"~r~~h~/commands~n~~g~/rules",5000,6);
    }
Can you tell me what this actually is for?

[gay]This forum requires that you wait 120 seconds between posts. Please try again in 26 seconds.[/gay]