error on compile
#1

The error is:
C:\Users\DELL\Desktop\Experienced Workers 1.1\gamemodes\Exworkers.pwn(10 : error 029: invalid expression, assumed zero

This is the script:

if(!strcmp(cmdtext, "/jointrucker"))
{
IsPlayerInRangeOfPoint(playerid, 1.0, 2440.4272460938, -2116, 13.546875);
{
new Text3D:label = Create3DTextLabel("Trucker", 0x10F441AA, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, -0.5);
SendClientMessage(playerid, COLOR_RED, "You have joined the truckers!");
}
else ----------------- HERE IS THE ERROR
{
SendClientMessage(playerid, 0x10F441AA, "You are not in range of the pickup");
}
return 1;
}
Reply
#2

PHP код:
if(!strcmp(cmdtext"/jointrucker"))
{
if(
IsPlayerInRangeOfPoint(playerid1.02440.4272460938, -211613.546875))
{
new 
Text3D:label Create3DTextLabel("Trucker"0x10F441AA30.040.050.040.00);
Attach3DTextLabelToPlayer(labelplayerid0.00.0, -0.5);
SendClientMessage(playeridCOLOR_RED"You have joined the truckers!");
}
else
{
SendClientMessage(playerid0x10F441AA"You are not in range of the pickup");
}
return 
1;

You forgot to do this:
if(IsPlayerInRangeOfPoint(playerid, 1.0, 2440.4272460938, -2116, 13.546875))
Reply
#3

now all my commands ingame wont work only FS commands
Reply
#4

Because your "returning" a value before the GM cmds get checked through, which means it will stop checking for the cmds once the FS calls the return
Reply
#5

how to fix it?
Reply
#6

remove return 1?
Reply
#7

i removed this command but cant see other commands too, the other command /loadtruck have return 1; and return 0;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)