If statement condition not taking (playerid).
#1

PHP код:
new bool:Instafix[MAX_PLAYERS];
if (
Instafix(playerid))
{
 
RepairVehicle(GetPlayerVehicleID(playerid));
}
    return 
1;
}
D:\SampSever\iPLEOMAX's TextDraw Editor\SAMP 0.3e Server\gamemodes\Untitled.pwn(219) : error 001: expected token: ";", but found ")"
D:\SampSever\iPLEOMAX'
s TextDraw Editor\SAMP 0.3e Server\gamemodes\Untitled.pwn(219) : error 029invalid expressionassumed zero 
I am using pwano
Reply
#2

When you create a player array, you cannot use () to wrap the playerid.

You need to do
Код:
if (Instafix[playerid] == true/false)
Also, you must assign true or false before checking for either one of it's state.

Quote:
Originally Posted by Maheerali
Посмотреть сообщение
I am using pwano
Obviously...
Reply
#3

Quote:
Originally Posted by Sjn
Посмотреть сообщение
When you create a player array, you cannot use () to wrap the playerid.

You need to do
Код:
if (Instafix[playerid] == true/false)
Also, you must assign true or false before checking for either one of it's state.
Pawn will detect "if(Instafix[playerid])" as true
And "if(!Instafix[playerid])" as false

No need to add extra info there.

Quote:
Originally Posted by Sjn
Посмотреть сообщение
Obviously...
Nop,he can use other editors too.

Код:
if (Instafix[playerid]) 
{ 
     RepairVehicle(GetPlayerVehicleID(playerid)); 
     return 1; 
}
Reply
#4

D:\SampSever\iPLEOMAX's TextDraw Editor\SAMP 0.3e Server\gamemodes\Untitled.pwn(159) : error 001: expected token: ";", but found "]"
Reply
#5

Quote:
Originally Posted by Maheerali
Посмотреть сообщение
D:\SampSever\iPLEOMAX's TextDraw Editor\SAMP 0.3e Server\gamemodes\Untitled.pwn(159) : error 001: expected token: ";", but found "]"
Show some previous lines
Reply
#6

Quote:
Originally Posted by K0P
Посмотреть сообщение
Pawn will detect "if(Instafix[playerid])" as true
And "if(!Instafix[playerid])" as false

No need to add extra info there.


Nop,he can use other editors too.

Код:
if (Instafix[playerid]) 
{ 
     RepairVehicle(GetPlayerVehicleID(playerid)); 
     return 1; 
}
D:\SampSever\iPLEOMAX's TextDraw Editor\SAMP 0.3e Server\gamemodes\Untitled.pwn(159) : error 001: expected token: ";", but found "]"
Reply
#7

CMD:armor(playerid, params[])
{
SetPlayerArmour(playerid, 100.00);
return 1;
}
CMD:fix(playerid, params[])
{
if (Instafix[playerid] == true)
{
RepairVehicle(GetPlayerVehicleID(playerid));
}
return 1;
}
Reply
#8

Код:
CMD:armor(playerid, params[])
{
SetPlayerArmour(playerid, 100.00);
return 1;
}
CMD:fix(playerid, params[])
{
if (Instafix[playerid] == true)
{
    RepairVehicle(GetPlayerVehicleID(playerid));
    return 1;
}
Reply
#9

Quote:
Originally Posted by K0P
Посмотреть сообщение
Код:
CMD:armor(playerid, params[])
{
SetPlayerArmour(playerid, 100.00);
return 1;
}
CMD:fix(playerid, params[])
{
if (Instafix[playerid] == true)
{
    RepairVehicle(GetPlayerVehicleID(playerid));
    return 1;
}
Still Error please help
Reply
#10

brace is missing @ the end of 2nd cmd
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)