Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / String error in line?

Author
Message
tokyomage
15
Years of Service
User Offline
Joined: 26th Sep 2010
Location: on your roof
Posted: 29th Aug 2012 01:16 Edited at: 1st Sep 2012 02:38
I have just come across a hopefully small bug involving an error named \\\"Failed to \\\'DoExpressionList:oExpressionListString\\\'\\\"

I have indeed searched as best as I can, and try and fix the bug myself but had no luck and so now I hope the community can help me on this one.

The code I am using :
Quote: "
Rem ***** Included Source File *****
Rem Created: Friday, April 27, 2012

Rem ***** Main Source File *****

REM MENU

rem menu background
load sound \\\"media/click.wav\\\",6
load image \\\"media/death.png\\\",17
load image \\\"media/menu.png\\\",1
load sound \\\"media/evilhit.wav\\\",1
load music \\\"media/menus.mp3\\\",11
loop music 11


sprite 1,690,560,1
backdrop on
color backdrop 0

menu:
do


if ((((mousex() >= 760) and (mousex() <= 854)) and ((mousey() >=680) and (mousey() <=735) and (mouseclick()=1))))njUB
goto load
endif

loop

load:
color backdrop 0
hide sprite 1
play sound 6
hide mouse
load image \\\"media/loading.png\\\",16
sprite 16,400,400,16
wait 1000

sync on
sync rate 60
phy start
lm start
AI Start
autocam off
position camera 1512, 499, 1024

rem loading sequence
load object \\\"map.x\\\",3
phy make rigid body static mesh 3
load object \\\"files/models/lobotomyo.x\\\",4
set object speed 4,25
set object interpolation 4,500
scale object 4,750,750,750
position object 4,object position x(4), object position y(4),20000
AI Add Enemy 4
AI Set Entity Speed 4,10000.0
rotate object 4,0,180,0
fix object pivot 4
AI Set Entity View Arc 4,90,170
AI Set Entity View Range 4,50
load image \\\"files/models/lobotomyo.dds\\\",3
texture object 4,3
set object ambience 4,140


load object \\\"media/mapbody.x\\\",5

load object \\\"files/models/end/end.x\\\",16
position object 16, -5000 + rnd(-700),0,15000
load image \\\"files/models/end/decayed2.dds\\\",18
texture object 16,18
set object speed 16,35
scale object 16,800,800,800
rotate object 16,0,180,0
fix object pivot 16
AI Add Enemy 16
AI Set Entity Speed 16,13800.0
AI Set Entity View Arc 16,90,170
AI Set Entity View Range 16,200


load image \\\"media/mapbodyt.dds\\\",4
texture object 5,4
scale object 5,600,600,600
turn object left 5,-124
load object \\\"files/models/mapbookobject.x\\\",8
load image \\\"files/models/mapbookobjectt.dds\\\",8
scale object 8,600,600,600
turn object right 8,107
position object 8,6266,object position y(8), 10304
load object \\\"files/models/bed.x\\\",10
load image \\\"files/models/bedt.dds\\\",10
turn object right 10,90
texture object 10,10
scale object 10,600,600,600
texture object 8,8
load sound \\\"media/runningsound.wav\\\",2
load sound \\\"media/Scream_Doctor.wav\\\",3
load sound \\\"media/door.wav\\\",4
load sound \\\"media/grunt.wav\\\",5
load sound \\\"media/danger.ogg\\\",16
load sound \\\"media/death.wav\\\",7
load sound \\\"media/screamingbass.wav\\\",8
load sound \\\"media/screamingbassredwalls.wav\\\",21
load music \\\"media/gatheringdarkness.wav\\\",1
load effect \\\"media/fogshader.fx\\\",1,1
load effect \\\"media/objectshader.fx\\\",2,1
load effect \\\"media/itemflash.fx\\\",3,1
load effect \\\"media/redfogshader.fx\\\",4,1
set object effect 3,1
set object effect 4,1
set object effect 5,1
set object effect 16,1
set object effect 8,3
set object effect 10,1

load object \\\"files/models/generator.x\\\",31
load image \\\"files/models/generator_d2.dds\\\",31
texture object 31,31
scale object 31,600,600,600
position object 31,2806,object position y(31), 57696
turn object left 31,90
phy make rigid body static mesh 31
set object effect 31,1


`Set gun holding-limb position
gunOffsetX AS FLOAT = 15.0
gunOffsetY AS FLOAT = -20.0
gunOffsetZ AS FLOAT = 20.0

`Make main player object and hide it
MAKE OBJECT box 1, 60, 1000, 60
position object 1,object position x(1), 500,-13900
ai add player 1
HIDE OBJECT 1
phy make box character controller 1, object position x (1), 500, object position z (1), 60, 220, 60, 1, 15, 60.0
`Attach a limb and delete the mesh
MAKE MESH FROM OBJECT 1,1
ADD LIMB 1,1,1
DELETE MESH 1: set object effect 1,2
set object effect 1,1
position object 10,6762,object position y(10), 10691
phy make rigid body static mesh 10

`Make a weapon and attach it to the limb
load object \\\"files/models/bottlewep.x\\\", 2
load image \\\"files/models/gun_D.dds\\\" ,1
texture object 2, 1
fix object pivot 2
ROTATE OBJECT 2, 0, 180, 0
GLUE OBJECT TO LIMB 2,1,1

load object \\\"files/models/map.x\\\", 9
load image \\\"files/models/gun_Dmap.dds\\\" ,9
texture object 9, 9
fix object pivot 9
ROTATE OBJECT 9, 0, 180, 0
GLUE OBJECT TO LIMB 9,1,1
hide object 9

position object 5,6443,5,10199
phy make rigid body static mesh 5


xpos AS FLOAT = object position x(1)
zPos AS FLOAT = object position z(1)
speed AS FLOAT = 10.0

xLook AS FLOAT
yAng AS FLOAT
lookSpeed AS FLOAT = 0.2

load image \\\"media/bloodsplat.png\\\",7
sprite 6,0,0,7
scale sprite 6,600
hide sprite 6

`The gun bobbing values
gunBobSpeed AS FLOAT = 6.0
gunBobMove AS FLOAT = 12.0
gunBobHeight AS FLOAT = 6.0

gunBobAng AS FLOAT
gunTurnAng AS FLOAT
gunLookAng AS FLOAT

mouseMovementX AS FLOAT
mouseMovementY AS FLOAT

speed = 700
runspeed = 1000

speed#=0.2=o
damper#=10.0

load sound \\\"media/sounds.wav\\\",9
load sound \\\"media/pickup.wav\\\",10



stop music 11
goto game
game:
sprite 3,0,0,4
scale sprite 3,212
set camera range 0,1,999999999999
hide sprite 3
sync on
hide mouse
play sound 9
play sound 4
loop music 1: set music volume 1,50
hide sprite 16


do


x = object position x(31)
z = object position z(31)



if upkey() = 1
move object 31,30
endif

if downkey() = 1
move object 31, -30
endif

if leftkey() = 1
turn object left 31,5
endif

if rightkey() = 1
turn object right 31,5
endif

print z

if object collision (1,8) = 1
play sound 10
hide object 2
show object 9
position object 8,0,0,-9000000000000
ENDIF

if leftkey() = 0 then anim = 1
if mouseclick() = 1 then anim = 2

select anim
case 1
if object playing (2) = 0 then play object 2, 50,51
if object playing (9) = 0 then play object 9, 18,19

endcase

case 2
if object playing (2) = 0 then play object 2,136,136
if object playing (9) = 0 then play object 9,136,136

endcase

endselect

if object playing (16) = 0
play object 16,2580,2610
endif

select enemy

case 1
if object playing (4) = 0
play object 4, 2703,2793
endif

endcase

case 2

AI ENTITY MOVE TO CLOSEST SOUND 4
if object playing (4) = 0
play object 4, 2499,2560
endif
endcase

endselect

if ai get entity is moving(4) = 0 or ai get entity is turning(4) = 0

enemy = 1

else
enemy = 2

endif

ai entity go to position 16,object position x(1), object position z(1)
AI ENTITY MOVE TO CLOSEST SOUND 4

if ai get entity is moving(4) = 1

enemy = 2

else
enemy = 1

endif

if object collision (1,4) = 1
goto death
ENDIF

if object collision (1,16) = 1
goto death
ENDIF


`Store mouse movement
mouseMovementX = MOUSEMOVEX()
mouseMovementY = MOUSEMOVEY()

IF keystate(17)+keystate(31)> 0
IF keystate(17) = 1
phy move character controller 1,550
ai create sound object position x(1),object position z(1),3,120
ENDIF

IF keystate(31) = 1
phy move character controller 1,-550
ai create sound object position x(1),object position z(1),3,120
ENDIF

if xLook>90 and xLook<135 then xLook=90
if xLook<270 and xLook>225 then xLook=270

`Increase gun-bobbing angle to get gun bobbing
gunBobAng = WRAPVALUE(gunBobAng+gunBobSpeed)
ELSE
`Otherwise slowly change the value to nothing to bring the gun to the centre again
gunBobAng = CURVEANGLE(0,gunBobAng,10)
ENDIF

ai create sound object position x(1),object position z(1),3,600

`Control the gun swaying according to how much the player is turning
gunTurnAng = CURVEANGLE(WRAPVALUE(mouseMovementX),gunTurnAng,10)
gunLookAng = CURVEANGLE(WRAPVALUE(mouseMovementY),gunLookAng,10)

`Position the gun-holding limb and rotate it to give swaying effect
OFFSET LIMB 1,1,gunOffsetX+SIN(gunBobAng)*gunBobMove,gunOffsetY+ABS(COS(gunBobAng))*gunBobHeight,gunOffsetZ
ROTATE LIMB 1,1,gunLookAng,gunTurnAng,0

`Turn player
yAng = WRAPVALUE(yAng + mouseMovementX*lookSpeed)
xLook = WRAPVALUE(xLook + mouseMovementY*lookSpeed)

`Position player object and camera
POSITION OBJECT 1,object position x(1),500,object position z(1)
ROTATE OBJECT 1,0,yAng,0
PITCH OBJECT DOWN 1,xLook
POSITION CAMERA object position x(1),500,object position z(1)
ROTATE CAMERA xLook,yAng,0

if keystate(17) = 1 or keystate (31) = 1 or keystate (30) = 1 or keystate (32) = 1
moving = 1

ENDIF

friend = 1

if xLook>90 and xLook<135 then xLook=90
if xLook<270 and xLook>225 then xLook=270


`rem moving sound
if moving = 1
if sound playing (2) = 0 :set sound volume 1,50
play sound 2
endif
else
stop sound 2
endif

rem if screamer moving
if ai get entity is moving(4) = 1
if sound playing (8) = 0
play sound 8
endif
else
stop sound 8
endif

if ai get entity is moving(4) = 1
if sound playing (16) = 0
play sound 16
endif
else
stop sound 16
endif

moving = 0
ai update
phy update
sync
LOOP

death:

stop sound 2
stop sound 16
stop sound 4
stop sound 9
stop music 1
sprite 13,500,400,17
play sound 7


do



stop sound 2
stop sound 8
sync
LOOP
"

thanks, tokyomage[quote]


Did you know that water is wet? - "The more you know"
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 29th Aug 2012 05:07
Quote: "load sound \\\"media/click.wav\\\",6
load image \\\"media/death.png\\\",17
load image \\\"media/menu.png\\\",1
load sound \\\"media/evilhit.wav\\\",1
load music \\\"media/menus.mp3\\\",11"




Can you attach associated media and then I can break down your coding...

Also please use CODE BLOCKS by using [code ] [/code ] blocks without spaces around your code, or simply highlight an click the code button...

Also it would be best to mention that only users with Dark Lights, Dark AI and Dark Physics need help out... [or any with knowledge of them] I found not many users have much other than the core DB and free plugins on the forum... this makes things quite confusing for me...

I have the above plugins but if you care to attach your project folder as a zip file I would like to attempt to aide you with this... alternatively you can email it to me, check my profile.

Login to post a reply

Server time is: 2026-07-10 18:11:27
Your offset time is: 2026-07-10 18:11:27