![]() |
Public Function Issue
Hello! I am trying to create a real simple public function to replace the already complicated quest icon system I made on lexia. Here is what I want to do. I want to create a public function in my npc class named, icon...
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
I don't think you understand what you're actually trying to do, what public functions are for, or how classes work.
Perhaps this is what you're trying to do: Level NPC: PHP Code:
PHP Code:
Level NPC A: PHP Code:
PHP Code:
|
Also, never use if (playertouchsme).
|
Quote:
|
It's probably useful to point out why the above two posts are true:
There was a previous version of GScript which was less powerful than the current. The current language retained backwards compatibility so that older scripts wouldn't completely break. It's bad practice to use the old version whilst the new one is available. I think a simple analogy works here. When the PS2 was released, it was possible to play PS1 games on it, which was great because many people still had PS1 games they loved to play. The PS1 games were ugly in comparison to their PS2 counterparts and they are rarely played nowadays. Folk that still do are are either looking for nostalgia (a percentage of which become disappointed fairly quickly) or they picked up an older PS1 version of a PS2 game on eBay by accident. The latter type gets ridiculed from their peers for mistakingly buying and playing the older version of the game. The default level editor is the PS1, a rented server a PS2, GScript 1 is an old PS1 game and GScript 2 is a PS2 remaking of the same game. It should be obvious from here! I think at this point in time Graal is still waiting for its PS3? Some would argue a different type of console altogether. |
Quote:
Stefan was experimenting with JavaScript as a serverside language, though, but I haven't heard anything about it in the past year. If JS was used, it might be possible for him to use an existing JavaScript engine like V8 (which uses JIT compilation) for massive speed improvements (not that they're really needed on serverside). |
Quote:
I'd love to know more about that. Speed improvements are the last thing on the list here. CoffeeScript perhaps? |
Quote:
PHP Code:
PHP Code:
Quote:
|
Quote:
|
Quote:
Quote:
|
| All times are GMT +2. The time now is 07:05 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.