Hi. My next script error. main (11,1) ERR: Unexpected token. That's my script:
void OnStart()
{
AddEntityCollideCallback("Player","alexander1","Message1",true,1);
}
void Message1(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages","Alexander",10);
}
{
AddUseItemCallback("","key1","door1","Door",true);
}
void Door (string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door1",false,true);
PlaySoundAtEntity("","unlock_door","door1",1,false)
}
(03-30-2014, 08:20 PM)MaksoPL Wrote: [ -> ]{
AddUseItemCallback("","key1","door1","Door",true);
}
This is your problem.
To fix it, simply move it to OnStart().
Try this!
PHP Code:
void OnStart()
{
AddEntityCollideCallback("Player","alexander1","Message1",true,1);
AddUseItemCallback("","key1","door1","Door",true);
}
void Message1(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages","Alexander",10);
}
void Door (string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door1",false,true);
PlaySoundAtEntity("","unlock_door","door1",1,false)
}
(03-30-2014, 09:04 PM)Romulator Wrote: [ -> ] (03-30-2014, 08:20 PM)MaksoPL Wrote: [ -> ]{
AddUseItemCallback("","key1","door1","Door",true);
}
This is your problem. To fix it, simply move it to OnStart().
Try this!
PHP Code:
void OnStart()
{
AddEntityCollideCallback("Player","alexander1","Message1",true,1);
AddUseItemCallback("","key1","door1","Door",true);
}
void Message1(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages","Alexander",10);
}
void Door (string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door1",false,true);
PlaySoundAtEntity("","unlock_door","door1",1,false)
}
Main (16,1) ERR: Expected ';'
Code:
void OnStart()
{
AddEntityCollideCallback("Player","alexander1","Message1",true,1);
AddUseItemCallback("","key1","door1","Door",true);
}
void Message1(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages","Alexander",10);
}
void Door (string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door1",false,true);
PlaySoundAtEntity("","unlock_door","door1",1,false);
}
A missing ; in PlaySoundAtEntity.
so you can debug your own files
16,1 means
16 lines down from the top
and
1 character over from the right.