![]() |
Script doesn't work - Printable Version +- Gothic Online Forums (https://archive.gothic-online.com) +-- Forum: Scripting (English) (https://archive.gothic-online.com/forum-11.html) +--- Forum: Scripting Help (https://archive.gothic-online.com/forum-12.html) +--- Thread: Script doesn't work (/thread-259.html) |
Script doesn't work - Tuv - 28.12.2015 Hello, please help me understand what did I do wrong with this code, I don't know why draw and messages "VISMENU HIDDEN" and "VISMENU SHOWN" don't appear. http://pastebin.com/4pFUYCH1 I'm not very familiar with classess but this is basically a copy-paste of script "statistics.nut". RE: Script doesn't work - Buras - 28.12.2015 I think I made this work. Try that: Link RE: Script doesn't work - Tuv - 28.12.2015 Thank you! I've tried everything but I've missed it title_DrawVisual = null; RE: Script doesn't work - Bimbol - 28.12.2015 If you using class you have to remember, that any class vars, must be initialized in class constructor, and before initializing they have to be declared. So for example: Squirrel Script
RE: Script doesn't work - Tuv - 28.12.2015 Yes, I know that already, and actually I wonder why i can't make class like this Code: class Foo compiler says: expected 'IDENTIFIER' RE: Script doesn't work - Bimbol - 28.12.2015 (28.12.2015, 17:25)Tuv Wrote: Yes, I know that already, and actually I wonder why i can't make class like this Becasue doing this u spoil sytax of the class. Compiles says, that he wait for some identifier, which wasn't founded. In ur case u used reserved name table. The correct way is: Squirrel Script
In squirrel we have array, and tables. They are different containers of data. EDIT. If you really want to use tables then here is an example: Squirrel Script
|