Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Control NPC doesn't like breaks? (https://forums.graalonline.com/forums/showthread.php?t=63370)

Yen 01-12-2006 01:36 AM

Control NPC doesn't like breaks?
 
I've got a projectile. I want it to lay a bomb when it hits the ground.

PHP Code:

putnpc2(params[0], params[1], "join(\"bomb\");"); 

It should work, as far as I can tell. However, I get this error crap.

PHP Code:

Script compiler output for Control-NPC:
errorunexpected tokenbomb at line 557bomb\"";"");"
error: missing semicolon at line 557: bomb\""
;"");"
error: unexpected token: \ at line 557: bomb\""
;"");"
error: unexpected token: ) at line 557: bomb\""
;"");"
error: unexpected token: " 
at line 557bomb\"";"");"
error: unexpected token: SPC at line 557: bomb\""
;"");


Rick 01-12-2006 03:26 AM

HTML Code:

putnpc2(params[0], params[1], "join(\\"bomb\\");");
Yes I know that's incorrect but it works -- I think it's due to an RC bug.

napo_p2p 01-12-2006 03:40 AM

I would stay away from escape sequences and just put:

PHP Code:

putnpc2(params[0], params[1], "join bomb;"); 


Yen 01-12-2006 03:47 AM

Yeah, I did it in GS1 instead. Also, it doesn't run the script block with the error, so leaving it won't do.


All times are GMT +2. The time now is 07:49 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.