Jump to content


Photo

Solved


  • Please log in to reply
2 replies to this topic

#1 sithlord6

sithlord6

    GMC Member

  • New Member
  • 193 posts

Posted 11 June 2008 - 12:29 AM

Today I started learning 39dll, and in the game I made to test it I'm getting an error, and can't figure out why. It seems to work in all the examples I've seen , but I'm sure it's something simple and stupid :D

Here's the error:
[codebox]
___________________________________________
FATAL ERROR in
action number 1
of Keyboard Event for <Left> Key
for object cloud:

COMPILATION ERROR in code action
Error in code at line 6:
writebyte(0)

at position 2: Variable name expected.
[/codebox]


And here's the code (keyboard left event, same for other directions):
[codebox]if place_free(x-3,y){
x-=3
sprite_index=SECRET
image_speed=0.3
clearbuffer
writebyte(0)
writeshort(x)
sendmessage(global.udpsock,global.otherip,global.o
therudpport)[/codebox]

And no one say anything about coding style, optimization or anything, it's just a test after all :D

Edited by sithlord6, 11 June 2008 - 12:55 AM.

  • 0

#2 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 11 June 2008 - 12:36 AM

clearbuffer must have the brackets after it:

if place_free(x-3,y){
x-=3
sprite_index=SECRET
image_speed=0.3
clearbuffer()
writebyte(0)
writeshort(x)
sendmessage(global.udpsock,global.otherip,global.otherudpp
ort)

Edited by GMREC1111, 11 June 2008 - 12:36 AM.

  • 0

#3 sithlord6

sithlord6

    GMC Member

  • New Member
  • 193 posts

Posted 11 June 2008 - 12:53 AM

Yep, that pretty much proves my initial guess of simple and stupid. I forget that stuff all the time. Anyway, thanks for the quick reply, I guess this can be closed.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users