![]() |
Problem?
I have a problem when it comes to calling classes, I want to use a variable to hold the class name and use the :: operator to call it.
Here is a snippet from my code: PHP Code:
PHP Code:
|
Ugh, I cant even read the code thanks to the styling..
|
Quote:
|
Quote:
:whatever: |
Quote:
PHP Code:
Hmm. I'm not quite sure of what you are trying to accomplish, but, perhaps trying this will help? PHP Code:
|
ha mine is really different, no one else I know likes it but makes scripting and script reading easier for me. XP
|
Assuming that temp.getClasses is correctly assigned (please show us that code), we can only assume that (anything):: just doesnt work. for the sake of testing, try (@"battledata")::start
Tell me if that works or not. If it doesn't, looks like we need a new way to dynamically call a function from a class! Edit: I decided to not be lazy and try it, (@"anything")::whatever() will not work. Esentially what you are doing is giving the same npc multiple start() functions. it would be like doing this. function hi() { return 2; } function hi() { return 4; } Maybe you should find a better system? : ( |
| All times are GMT +2. The time now is 03:02 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.