Aller au contenu

Photo

[Script Help] ShowPopup


  • Veuillez vous connecter pour répondre
32 réponses à ce sujet

#26
NewYears1978

NewYears1978
  • Members
  • 894 messages
Ohhh..yes I had my inspector closed..normally it opens itself when you open a resource..but in this case it didn't. I am at work now but will try again. You're most helpful, I appreciate it a ton!

#27
Phaenan

Phaenan
  • Members
  • 315 messages
That's why my object inspector is always open now. ^_^

Modifié par Phaenan, 23 novembre 2009 - 04:00 .


#28
NewYears1978

NewYears1978
  • Members
  • 894 messages
Hrm I seem to be having a problem..keep getting error in the script call..

I made a new plot called "jlp_journal_hoarder" Set it to Codex>Notes and put in a Name for the name field..left rest blank.

Then in my script on my placeable that I have working already..I added

WR_SetPlotFlag(jlp_journal_hoarder, jlp_codex_hoarder, TRUE);

But this gives me an error "variable defined without type" for the above line..

Modifié par NewYears1978, 23 novembre 2009 - 05:05 .


#29
NewYears1978

NewYears1978
  • Members
  • 894 messages
Oh well I found that I have to include it as you say..but I don't understand how that works..

#include "wrappers_h"
#include "plt_jlp_journal_hoarder"

void main()

{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);

switch (nEventType)
{
case EVENT_TYPE_USE:
{
// ShowPopup( 1894414771, 3);
WR_SetPlotFlag(jlp_journal_hoarder, jlp_codex_hoarder, TRUE);

}
}

}


This is what I tried..you can see my script where I had the popup before..and it worked fine..all I have done is added the include line at the top...and added the SetPlot line..but it give me errors..Im sure I am missing something...

Modifié par NewYears1978, 23 novembre 2009 - 06:02 .


#30
Phaenan

Phaenan
  • Members
  • 315 messages
Case sensible constants, maybe ? Your plot constants are prolly in caps. (you can see them in the code explorer)

#31
NewYears1978

NewYears1978
  • Members
  • 894 messages
It defaults them to caps yes..maybe that's it..I will try that.

#32
NewYears1978

NewYears1978
  • Members
  • 894 messages
That didn't change anything..I can't figure it out :(

#33
NewYears1978

NewYears1978
  • Members
  • 894 messages
Oh wait..you have to add the PLT_ in front of it even in the call...I hadn't put that..it confuses me that you have to add that...generally you don't add prefixes..or at least I hadn't had to yet...going to try again.

Edit:

Ah, okay..for some reason when dealing with plots it alwyas makes everything go full caps...and is case sensitive..had to put both constants in caps.  Also had to add the PLT_ in front of the include (which I had) AND the constant in the script..

Then it worked.

Thank you again =)

Modifié par NewYears1978, 23 novembre 2009 - 09:43 .