Compilation Error -
Leighton - 04.05.2013
C:\Users\Leighto\Desktop\GTA\Server\gamemodes\Serv er.pwn(16930) : error 017: undefined symbol "distance"
C:\Users\Leighto\Desktop\GTA\Server\gamemodes\Serv er.pwn(16930) : warning 215: expression has no effect
C:\Users\Leighto\Desktop\GTA\Server\gamemodes\Serv er.pwn(16930) : error 001: expected token: ";", but found ")"
C:\Users\Leighto\Desktop\GTA\Server\gamemodes\Serv er.pwn(16930) : error 029: invalid expression, assumed zero
C:\Users\Leighto\Desktop\GTA\Server\gamemodes\Serv er.pwn(16930) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
But on line ( 16930 ). It says HouseInfo[iIndex][hTextID] = CreateDynamic3DTextLabel(szFileStr, COLOR_GREEN, HouseInfo[iIndex][hExteriorX], HouseInfo[iIndex][hExteriorY], HouseInfo[iIndex][hExteriorZ]+0.5,30.0, .testlos = 1, .distance = 30.0);
I'm not sure what i did wrong? Can anyone help?
Re: Compilation Error -
Diamondier - 04.05.2013
Doesn't look like you've defined "Distance"
Re: Compilation Error -
Jstylezzz - 04.05.2013
remove the words .testlos and distance, also remove the
'=', just leave the numbers.
Re: Compilation Error -
MP2 - 04.05.2013
Look at the parameters:
pawn Код:
native Text3D:CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);
It's streamdistance, not distance.
Quote:
Originally Posted by Jstylezzz
remove the words .testlos and distance, also remove the
'=', just leave the numbers.
|
Do you actually know what .distance = 30 does? It passes the 'distance' parameter as 30, without passing the ~5 before it, making your code shorter and clearer. It's even useful if you're using all the parameters, as you know exactly which values you're passing to which parameter. For example, without that, his code would be:
(Note: No pawn tags as they hide some of the line. I want you to see it all.)
HouseInfo[iIndex][hTextID] = CreateDynamic3DTextLabel(szFileStr, COLOR_GREEN, HouseInfo[iIndex][hExteriorX], HouseInfo[iIndex][hExteriorY], HouseInfo[iIndex][hExteriorZ]+0.5,30.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 30);
Whereas with it:
HouseInfo[iIndex][hTextID] = CreateDynamic3DTextLabel(szFileStr, COLOR_GREEN, HouseInfo[iIndex][hExteriorX], HouseInfo[iIndex][hExteriorY], HouseInfo[iIndex][hExteriorZ]+0.5,30.0, .testlos = 1, .streamdistance = 30.0);
In the first example, it's not at all clear which parameter is which.
For example:
pawn Код:
SendClientMessage(.color = 0xFF0000FF, .message = "Hello", .playerid = playerid);
Re: Compilation Error -
Leighton - 04.05.2013
Oh wow, thanks for the quick replies guys. I will edit it soon and see what happens

.
Re: Compilation Error -
Leighton - 04.05.2013
Quote:
Originally Posted by MP2
Look at the parameters:
pawn Код:
native Text3D:CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);
It's streamdistance, not distance.
Do you actually know what .distance = 30 does? It passes the 'distance' parameter as 30, without passing the ~5 before it, making your code shorter and clearer. It's even useful if you're using all the parameters, as you know exactly which values you're passing to which parameter. For example, without that, his code would be:
(Note: No pawn tags as they hide some of the line. I want you to see it all.)
HouseInfo[iIndex][hTextID] = CreateDynamic3DTextLabel(szFileStr, COLOR_GREEN, HouseInfo[iIndex][hExteriorX], HouseInfo[iIndex][hExteriorY], HouseInfo[iIndex][hExteriorZ]+0.5,30.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 30);
Whereas with it:
HouseInfo[iIndex][hTextID] = CreateDynamic3DTextLabel(szFileStr, COLOR_GREEN, HouseInfo[iIndex][hExteriorX], HouseInfo[iIndex][hExteriorY], HouseInfo[iIndex][hExteriorZ]+0.5,30.0, .testlos = 1, .streamdistance = 30.0);
In the first example, it's not at all clear which parameter is which.
For example:
pawn Код:
SendClientMessage(.color = 0xFF0000FF, .message = "Hello", .playerid = playerid);
|
Wow thanks to you my server is working now

, i'm new to scripting and now it works fine and compiles thank you so much.