Scripting Problem
#1

Hello, I'm working on my new script.

The script has given me two errors which I am confused on how to continue with.

Errors:

Код:
C:\Users\****\Desktop\samp\gamemodes\APO.pwn(2398) : error 029: invalid expression, assumed zero
C:\Users\****\Desktop\samp\gamemodes\APO.pwn(2416) : warning 225: unreachable code
Line 2398

Код:
*2398*|||||	if(PlayerInfo[playerid][BankRobbery] == 1 || IsPlayerAdmin(playerid) == 1))
*2399*|||||	{
Line 2416

Код:
*2416*|||||  	return 1;
*2417*|||||  }
If you could help me solve this, I would greatly appreciate.
Reply
#2

pawn Код:
if(PlayerInfo[playerid][BankRobbery] == 1 || IsPlayerAdmin(playerid) == 1)
Reply
#3

So I'm guessing it should look something like this all together...?

pawn Код:
if(PlayerInfo[playerid][BankRobbery] == 1 || IsPlayerAdmin(playerid) == 1))
{
     // all codes between here
     return 1;
}
I'm confused by how you formatted it above.

EDIT:

Lethal is right (above) You had an extra closing bracket ' ) '
Reply
#4

Why Thank you for your help, I'm surprised I missed that. Although That was the same with multiple strings...but they did not error...interesting!

EDIT:

It turns out that line's string was the only one that was interrupted whilst the others stayed able to be used.
Reply
#5

Код:
*2398*|||||	if(PlayerInfo[playerid][BankRobbery] == 1 || IsPlayerAdmin(playerid) == 1)
*2399*|||||	{
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)