Code fix please?
#1

Can someone fix this line? New to scripting.

PHP код:
    HouseInfo[iIndex][hTextID] = CreateDynamic3DTextLabel(szFileStrCOLOR_GREENHouseInfo[iIndex][hExteriorX], HouseInfo[iIndex][hExteriorY], HouseInfo[iIndex][hExteriorZ]+0.5,30.0, .testlos 1, .distance 30.0); 
Errors:

PHP код:
D:\[Do Not OpenROHAN\test\New Folder\gamemodes\KGRP.pwn(16897) : error 017undefined symbol "distance"
D:\[Do Not OpenROHAN\test\New Folder\gamemodes\SLRP.pwn(16897) : warning 215expression has no effect
D
:\[Do Not OpenROHAN\test\New Folder\gamemodes\SLRP.pwn(16897) : error 001expected token";"but found ")"
D:\[Do Not OpenROHAN\test\New Folder\gamemodes\SLRP.pwn(16897) : error 029invalid expressionassumed zero
D
:\[Do Not OpenROHAN\test\New Folder\gamemodes\SLRP.pwn(16897) : fatal error 107too many error messages on one line 
Reply
#2

PHP код:
HouseInfo[iIndex][hTextID] = CreateDynamic3DTextLabel(szFileStrCOLOR_GREENHouseInfo[iIndex][hExteriorX], HouseInfo[iIndex][hExteriorY], HouseInfo[iIndex][hExteriorZ]+0.5,30.0130.0); 
Reply
#3

Quote:
Originally Posted by nezo2001
Посмотреть сообщение
PHP код:
HouseInfo[iIndex][hTextID] = CreateDynamic3DTextLabel(szFileStrCOLOR_GREENHouseInfo[iIndex][hExteriorX], HouseInfo[iIndex][hExteriorY], HouseInfo[iIndex][hExteriorZ]+0.5,30.0130.0); 
Bro, This one?

PHP код:
    HouseInfo[iIndex][hTextID] = CreateDynamic3DTextLabel(szFileStrCOLOR_GREENHouseInfo[iIndex][hExteriorX], HouseInfo[iIndex][hExteriorY], HouseInfo[iIndex][hExteriorZ]+0.5,30.0, .testlos 1, .distance 30.0); 
Errors:
PHP код:
D:\[Do Not OpenROHAN\test\New Folder\gamemodes\KGRP.pwn(16897) : warning 213tag mismatch
D
:\[Do Not OpenROHAN\test\New Folder\gamemodes\KGRP.pwn(16898) : error 001expected token"-identifier-"but found "="
D:\[Do Not OpenROHAN\test\New Folder\gamemodes\KGRP.pwn(16898) : warning 215expression has no effect
D
:\[Do Not OpenROHAN\test\New Folder\gamemodes\KGRP.pwn(16898) : error 001expected token";"but found ")"
D:\[Do Not OpenROHAN\test\New Folder\gamemodes\KGRP.pwn(16898) : error 029invalid expressionassumed zero
D
:\[Do Not OpenROHAN\test\New Folder\gamemodes\KGRP.pwn(16898) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664     Copyright (coffee1997-2006ITB CompuPhase
4 Errors

Reply
#4

you can't use it like this
PHP код:
 HouseInfo[iIndex][hTextID] = CreateDynamic3DTextLabel(szFileStrCOLOR_GREENHouseInfo[iIndex][hExteriorX], HouseInfo[iIndex][hExteriorY], HouseInfo[iIndex][hExteriorZ]+0.5,30.0, .testlos 1, .distance 30.0); 
Remove
PHP код:
.testlos //and
.distance 
Put instead of them the number directly...
Reply
#5

When the compiler says "undefined symbol",that means that the variable in question didn't exist,so,you don't have the var "distance" and remember,for positions,life bar,armour bar and things that can have any value,use new Float:.

And why are you putting those dots in front of the variables ?
You can only creatr variables with "new",on stock functions or on forward functions,the native functions don't allow you to do those things.
Reply
#6

Quote:
Originally Posted by nezo2001
Посмотреть сообщение
you can't use it like this
PHP код:
 HouseInfo[iIndex][hTextID] = CreateDynamic3DTextLabel(szFileStrCOLOR_GREENHouseInfo[iIndex][hExteriorX], HouseInfo[iIndex][hExteriorY], HouseInfo[iIndex][hExteriorZ]+0.5,30.0, .testlos 1, .distance 30.0); 
Remove
PHP код:
.testlos //and
.distance 
Put instead of them the number directly...
Worked like a charm! Thanks alot!
Reply
#7

You are welcome
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)